Silicon Graphics

[Prev] [TOC] [Next]



(-) OpenGL Programming Guide
(-) Appendix GHomogeneous Coordinates and Transformation Matrices
(-) Transformation Matrices

Rotation

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]

Then

[IMAGE]

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]

As before, the inverses are obtained by transposition.


[Prev] [TOC] [Next]

OpenGL Programming Guide


Maintained by Maintainer: Send e-mail to .htm">name@address.