Performing rotation about an Axis
For performing rotation about an axis parallel to one of the coordinate axes (say z-axis), you first need to translate the axis (and hence the object) so that it aligns with that coordinate axis (z-axis) and then perform the rotation. Finally, translate the axis back to its original position.