Obtaining momentum quaternion from two quaternions and timestep

若如初见. 提交于 2019-12-11 09:53:01

问题


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:


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.



来源:https://stackoverflow.com/questions/12439109/obtaining-momentum-quaternion-from-two-quaternions-and-timestep

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!