How rotations work
A three-dimensional rotation can be expressed as three individual rotations, one around the X Axis, one around the Y Axis, and one around the Z Axis. The smallest matrix we can use to store this type of rotation is a 3 X 3 matrix. When storing rotation in a larger 4 X 4 matrix, we store rotations in its upper 3 X 3 sub-matrix.
The 3 X 3 Rotation Matrix is composed of three vectors that represent each axis of the coordinate system of the matrix. These vectors are called the basis vectors. The basis vectors are stored row or column wise depending on the major of the matrix. We use a 3 X 3 matrix to store three-dimensional rotation data; it is not the only function of a 3 X 3 matrix. We will discuss different uses of 3 X 3 matrices later in the book:
The orientation of this 3 X 3 matrix can be expressed by some combination of yaw, pitch, and roll. Yaw represents rotation around the objects, local Perpendicular Axis, the Y-Axis. Pitch is the rotation around the object's local...