You can use quaternions to rotate vectors or other quaternions. The same formula is used to rotate quaternions by other quaternions as to rotate vectors by other quaternions. The only difference is that the vector becomes a quaternion with a scalar component of zero, yet the scalar of the resulting product is ignored. The formula for rotating vectors and quaternions is shown in Figure 2.4.
P’ =9(P)(~9) p can be a quarternion or a vector
Figure 2.4 Using a quaternion to rotate vectors and other quaternions.
Remember, when rotating a vector, you use a quaternion with a scalar value of zero and ignore the resulting scalar in the result.
Category: Focus On 3D Models