Very simple question (although I’m not sure why the answer isn’t so simple to me!).

I would like to rotate an object around some fixed coordinate system. Problem is, when you begin one rotation around a given axis, this rotation affects all subsequent rotations.

I’m sure many have experienced this problem. Problem is, I’m not sure how to search for related topics because I cannot explain the problem in just a couple of words! I’ve tried several searches, but to no avail (so far).

The OpenGL wiki suggests that the use of quaternions might help solve this problem - but the suggested link is broken. I’ve never even heard of a quaternion - sounds like it’s out of Star Trek or something

Anyhow, I promise to keep searching for solutions. But if anyone could suggest any direction I would greatly appreciate it. I’ll look into quaternions as well… but I it’s sounds like overkill for my situation.

If you google for quaternions, you will find plenty of explanation (they are simple and very nice). Basicaly, they allow you to rotate something around a vector.

The rotation that OpenGL performs on vectors is almost identical to what you would get with a quaternion (see the formulation given on page 45 of the specification and compare that to a quaternion rotation of q* (0,v) q).

The trouble lies in concatenating rotation matrices, or repeatedly rotating individual basis vectors, which are not likely to remain orthogonal.

Fixed Euler angle rotation sequences are just fine if you understand their limitations.