Page 6 -- 3D Transformations Using A 3x3 Matrix
Transformations in three dimensions are generally used to describe pure translation, pure rotation, rotation about any axis, or a combination of these three processes for a vector or set of vectors.
PURE TRANSLATION
To change the position of the origin of a coordinate system but maintain attitude in three dimensions
TRANSLATION DEMO
PURE ROTATION
To rotate the coordinate system about one of the unit axes
Pure rotation about a coordinate axis in three dimensions is similar to 2D rotation, except that the additional degree of freedom (or the third vector coordinate) must be preserved. A unit marker is placed in the matrix position corresponding to axis rotation, as shown below for each coordinate axis.
PURE ROTATION DEMO
ROTATION ABOUT ANY AXIS
To rotate the coordinate system about a vector {u,v,w}
Of course it is possible to rotate the coordinate system about any axis in space, with a rotation matrix of the following form:
where "c" and "s" indicate cosine and sine functions, respectively, and {u,v,w} is the vector notation of the rotation axis in global coordinates.
AXIS ROTATION DEMO