3d geometry: how to interpolate a matrix

前端 未结 6 1846
别跟我提以往
别跟我提以往 2020-12-14 09:25

i store the position of an object in 3d space in a 4by4 transformation matrix. now in order to move the object from the position stored in matrix A to the position stored in

6条回答
  •  一整个雨季
    2020-12-14 09:51

    let me rephrase your question:

    you need to interpolate between R0 and R1.

    And proposing to do it as:

    Ri = aR0 + (1-a)R1

    It won't work well, as victor mentioned in his/her answer: you will get skewing and volume deformations.

    mathematically (in 3d geometry context), addition does not make much sense: what does adding two translation matrix mean?

    an established solution is to interpolate as:

    Ri = (R1*(inverse(R0)))^a*R0

    where we define R^a as an operation that gives us a rotation about vector [kx, ky, kz] by a*theta degrees.

    so when a = 0, Ri = R0; when a = 1, Ri = R1. This make interpolation based on multiplication, which is more natural in 3d geometry context.

    Now the hard part to how to represent operation R^a. Turns out using quaternion representation of R allows us to represent the operation R^a. based on Ken Shoemake's paper animating rotation with quaternion curves

提交回复
热议问题