Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: The inverse of a quaternion.

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2003
    Logan, UT, USA

    The inverse of a quaternion.

    Hello, all,

    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.

  2. #2
    Intern Newbie
    Join Date
    Jan 2004
    Budapest, Hunary

    Re: The inverse of a quaternion.

    [This message has been edited by orbano (edited 01-24-2004).]
    Knowledge is no more expensive than ignorance, but at least as satisfying...

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2003

    Re: The inverse of a quaternion.

    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
    identity element.

    For a normalized quat this means:

    q * q^t must equal 1!

    m i s s i l e

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts