Understanding Quaternion Rotations

less than 1 minute read

An object in 3-space can go from any initial orientation to any final orientation by:

  • defining exactly one vector in 3-space
  • rotating that object about that vector by a specific angle

The anatomy of a quaternion

A quaternion is defined:

Where , and are all unit vectors along the three spatial axes.

Significance of the 3-Space Component

To understand quaternion rotation intuitively, let’s ignore the “real” part and only pay attention to the 3-space component:

The magnitude defines a fraction from to which represents a to rotation about the vector .

Note: The relationship between is not linear. therefore, a rotation of maps to .

What about a?

The mathematics of quaternions are a little bit more involved than what I described above.

Thier inventer, William Hamilton desctibes them as quotents of two vectors, which requires . Therefore, effectively describes how much a vector should not rotate in order to point in the direction of another vector.

A value of indicates the two vectors making up the quaternion pointed in the same direction.

Calculating a quaternion from a vector and rotation

Given a unit vector:

And an angle which we will rotate around the unit vector by, .