Interpolate two transformations - quarterions

unhandled

#1

Hi,

Some years ago Daniel Piker showed an example how to interpolate transformations matrices for fabrication layouts. Is that example still present somewhere or something similar? I tried to search gh forum without luck


#2

Maybe @DanielPiker him and he’ll come hopping :kangaroo:


(Tom) #3

Hello,

you need to convert from matrix(3x3) to quaternion, then use a “slerp” function, to interpolate between two quaternions
and then convert back to matrix(3x3) again. This is just for rotation. For location simple use loc+(deltavector * t )
conversions can be found here:

http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToMatrix/index.htm
http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/

be aware that quaternions can be x,y,z,w or w,x,y,z, order. Do you know how get from a rotationmatrix(3x3) to a transformationmatrix(4x4)?


(Daniel Piker) #4

See this reply:


#5

Thank you very much.