Advertisement

Gimbal Lock

Started by October 05, 2001 08:13 PM
4 comments, last by masonium 23 years, 4 months ago
what is Gimbal lock? How do I avoid it with Euler angles. BTW, what are Euler angles, exactly?
Use quaternions insted, the ginbal lock happens when you use 90 degree of rotation , this problem is solved using the complex method as in quaternions, if you look around there is a plenty of examples in the net

Advertisement
The gimbal lock occurs only when you rotate around all three axes and when you reach a 90 degrees and, only when you use Euler rotations.... So you could take the long hard workaround by using quaternions. Or you create your own rotation matrix out of three vertices, which represent your three axes. One of the NeHe tutorials, handles this topic. Or drop me a mail and I will send you the relly easys maths...
I believe gimbal lock occurs when there is an ambigious orientation. I think this is what quaternions try to solve. My favorite representation is the orthogonal basis vector matrix, which is just the "right", "up", and "direction" vectors in the first three rows of the matrix, and finally the "position" vector is the forth row of the matrix. This representation can also fail if you try to compose the "up" vector from the "direction". This is a common mistake when using this representation. The solution is to never compose the "up" vector, but start with an initial direction and up that''s orthogonal, and always rotate _both_ vectors by the same rotation matrix, this insures the objects orientation is preseved.
--bart
Thanks everybody. I thought gimbal lock would crash my comp or something

Visit http://www.anticz.com/eularqua.htm for a reasonable explanation of Gimbal lock and its affect on programming.

Timkin

This topic is closed to new replies.

Advertisement