从两个四元数和时间步获取动量四元数 [英] Obtaining momentum quaternion from two quaternions and timestep

查看:103
本文介绍了从两个四元数和时间步获取动量四元数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个四元数,它可以保持对象的旋转。在框架期间,我对其进行了修改并获得了新的四元数。我可以计算出从上一帧旋转到当前帧的四元数。

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'.

我不知道如何将四元数除以t

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

即,基于时间步长,我需要知道将四元数应用于自身后会是什么样子X倍的次数(即28.5 fps,28.5倍,等等)。

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?

推荐答案

因为组合旋转是等效的四元数乘法,重复旋转X次等于幂运算: pow(q,X)= pow(q,1 / t) exp(ln(q)* X)= exp(ln(q)/ t)。在此处中了解如何计算。

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.

这篇关于从两个四元数和时间步获取动量四元数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆