When I have two orientation quaternions, how do I find the rotation quaternion needed to go from one to the other?

隐身守侯 提交于 2019-12-03 07:10:33

In order to "divide" with a quaternion, you invert it so that it's the opposite rotation. In order to invert a quaternion, you negate either the w component or the (x, y, z) components, but not both since that would leave you with the same quaternion you started with (a fully negated quaternion represents the same rotation).

Then, remember that quaternions aren't commutative. So:

q2 = r*q1
q2*q1' = r

Where q1' is the inverted quaternion and it must be multiplied on the right side of q2 to get the right result.

You should have a look to this page (euclideanspace), it is really interesting for self-teaching and understanding quaternions.

Here you have the arithmetics for quaternions and also a calculator that makes the operations for you:

http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/arithmetic/index.htm

Hope it helps.

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