Quaternion between two quaternions - MathOverflow [closed]most recent 30 from http://mathoverflow.net2013-05-23T09:52:07Zhttp://mathoverflow.net/feeds/question/61827http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://mathoverflow.net/questions/61827/quaternion-between-two-quaternionsQuaternion between two quaternionsabc2011-04-15T15:18:37Z2011-04-15T15:24:26Z
<p>Hello,
I have an orientation P1 in a 3D space, represented as a quaternion [w x y z].
Then P1 is rotated using another quaternion (q1) with the formula</p>
<p><code>P2=q1*P1*q1'</code></p>
<hr>
<p>Is there any formula in order to get q1 from P2 and P1?</p>
<p>Thank you.</p>
http://mathoverflow.net/questions/61827/quaternion-between-two-quaternions/61828#61828Answer by Igor Rivin for Quaternion between two quaternionsIgor Rivin2011-04-15T15:24:26Z2011-04-15T15:24:26Z<p>I am not sure what the OP means by "orinentation", but if the question is about the rotation of one (unit) vector into another, the axis of such a rotation is the cross product of the two vectors (assumed unit) and the angle is the arccos of the scalar product. You can then read off the quaternion. See:</p>
<p><a href="http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation" rel="nofollow">http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation</a></p>