Obtaining momentum quaternion from two quaternions

2019-08-05 06:00发布

I have a quaternion which holds the rotation of an object. During the frame I modify it and obtain a new quaternion. I can calculate a quaternion that rotates from 'previous frame' to 'current frame'.

I cannot figure out, however, how to 'divide by t' this quaternion to get the rotation-per-second that I need.

I.e, based on the timestep, I need to know what the quaternion would look like had it been applied to itself an X amount of times (meaning, 28.5 times at 28.5 fps, etcetera).

Would anybody know how to do this? Or would you advise me to do something akin converting to Euler, multiplying, and then converting back?

1条回答
迷人小祖宗
2楼-- · 2019-08-05 06:23

Since combining rotations is equivalent to quaternion multiplication, repeating a rotation X times is equivalent to exponentiation: pow(q,X)=pow(q,1/t), or exp(ln(q)*X)=exp(ln(q)/t). See how to calculate these here.

查看更多
登录 后发表回答