Rotation matrices

Hi all, I’m trying to get my head the algorithm for rotating around an arbitrary axis like that produced by glRotate. By the algorithm I mean the one under the “Description” header in this article: http://www.talisman.org/opengl-1.1/Reference/glRotate.html
More importantly I want to understand how it’s derived. Does anyone happen to know any good learning resources or books which explain this well? :slight_smile:

Thanks

Paul

This Wikipedia page might help, although it doesn’t really have the derivation:

I believe the matrix under the “Rotation matrix from axis and angle” heading is the same as the glRotate one.

Also this page has a derivation (it is quite terse though and doesn’t explain everything):

http://inside.mines.edu/~gmurray/ArbitraryAxisRotation/

I don’t know of any textbook in particular, but a linear algebra textbook might have the derivation.

Cheers for the reply. :slight_smile: Yeah, I’ve found a few definitions through google but it’s harder to find an explanation of the underlying maths. It’s got such a broad definition that it’s quite hard to find a clear relevant explanation.

Have you done much linear algebra before? Do you understand how Txz and Tz are found in that second link I posted? I might be able to explain things a bit more…

All you need to know is: parallel projection (aka dot product). You parallel project a point into three orthogonal vectors…you’ve rotated. Put those three steps into a matrix…done.

http://rel.phatcode.net/mytutes/3dtutes/chapter4/chapter4.htm