3d geometry: how to interpolate a matrix

前端 未结 6 1876
别跟我提以往
别跟我提以往 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:49

    Source code for transformation matrix interpolation, with an unrestrictive license, can be found in the WebKit project; see the functions called 'blend', which create an interpolated matrix:

    for general 4 x 4 matrices

    for six-element affine transforms used in 2D graphics

    All the files, including headers, can be found in the enclosing directory.

    BUT I have just tried the 2D affine code and it doesn't preserve the centre of rotation when interpolating between rotations. So I am now not so sure that it is useful.

提交回复
热议问题