In the previous post, we introduced quaternions and discussed some of their basic properties. Quaternions are often used in 3D applications such as graphics and robotics to perform smooth rotations.
In this post we describe how to use quaternions to represent points in 3D and how to use quaternion operations to perform rotations about an arbitrary axis.
Suppose we have a point with coordinates . We would like to rotate about the axis by an angle of . Let us denote the rotated point by .
To calculate the coordinates of , we first represent the point with the following quaternion:
We then use the rotation axis and angle to form the following unit quaternion:
Finally, we calculate by forming the product:
where is the conjugate of (see the previous post for details). On inspecting the components of , we should find that the real part is zero. The three complex components give us the coordinates for .