Quaternions vs Axis + angle

Chris Condy picture Chris Condy · Feb 23, 2012 · Viewed 7.3k times · Source

I have been trying to find the difference between the 2 but to no luck minus this

The primary diff erence between the two representations is that a quaternion’s axis of rotation is scaled by the sine of the half angle of rotation, and instead of storing the angle in the fourth component of the vector, we store the cosine of the half angle.

I have no idea what

sine of the half angle of rotation

or

cosine of the half angle

means?

Answer

Ben picture Ben · Aug 5, 2013

Quaternios and Axis-angle are both 4D representations of 3D rotations/orientations and both have pro's and cons.

Axis-angle: represents the rotation by its angle a and the rotation axis n. For example, a rotation of 180 degrees around the Y-Axis would be represented as a = 180, n= {0,1,0}. The representation is very intuitive, but for actually applying the rotation, another representation is required, such as a quaternion or rotation matrix.

Quaternion: represents a rotation by a 4D vector. Requires more math and is less intuitive, but is a much more powerful representation. Quaternions are easily interpolated (blending) and it is easy to apply them on 3D point. These formula's can easily be found on the web. Given a rotation of a radians about a normalized axis n, the quaternion 4D vector will be {cos a/2, (sin a/2) n_x, (sin a/2) n_y, (sin a/2) n_z}. That's where the sine and cosine of the half angle come from.