View Full Version : The inverse of a quaternion.
01-24-2004, 10:18 AM
I am working on the QuakeIII md3 model loading code, everything works fine now except that the rotation interpolating part. This is done using crazy quaternions, and the problems is that the torso part rotates in the reverse direction of what it should do. I try to inverse the quaternion so that I can reverse the direction the torso rotates. Can anybody show me how to? Thanks.
01-24-2004, 11:51 AM
[This message has been edited by orbano (edited 01-24-2004).]
m i s s i l e
01-26-2004, 11:54 AM
The inverse of a quaternion q.
Lets assume q is normalized, i.e. |q| = 1.
Usually, normalized quaternions are associated,
with rotations in R³. Rotations in R³ are
orthogonal matrices having determinant +-1.
The definition of an orthogonal matrix says
that the inverse equals its transpose.
So, one "solution" (for people having only a minor
knowledge of quaternions) is to convert the quat.
to a rotation in R³, transpose that rotation
and convert it back to a quaternion. This will give
you the inverse quaternion.
But this is not necessary, its far more easier.
If the quat. q is normalized, then the inverse
quat. q^(-1) of q is given by :
q^(-1) = q^t
q^t is the so-called conjugate (which can be
viewed as of transposing the equivalent rotation
matrix). Conjugation (in a complexified space) is
done by inverting the signs of the imaginary
numbers. For example, the conjugate of a complex
numbers z = a + ib is z^t = a - ib. And this is the
same with quaternions:
Let q = a + ib + jc + kd be a quaternion, then
q^t = a - ib - jc - kd
is the conjugate quaternion of q.
So the inverse is easily be found.
A side: Being the inverse of an element implies
that, if you combine the inverse of an element
with the element itself then you will get the
For a normalized quat this means:
q * q^t must equal 1!
m i s s i l e
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.