The call glRotate*(a, x, y, z) generates R as follows.
Let v = (x, y, z)T, and u = v/||v|| = (x', y', z').
Also let
![[IMAGE]](figures/eqapg03.gif)
Then
![[IMAGE]](figures/eqapg04.gif)
The R matrix is always defined. If x=y=z=0, then R is the identity matrix. You can obtain the inverse of R, R-1, by substituting -a for a, or by transposition.
The glRotate*() command generates a matrix for rotation about an arbitrary axis. Often, you're rotating about one of the coordinate axes; the corresponding matrices are as follows.
![[IMAGE]](figures/eqapg05.gif)
As before, the inverses are obtained by transposition.
OpenGL Programming Guide