# Euler Angles Can Cause Gimbal Lock, But Not Quaternions

Am reading Second Life's doc about rotation (at http://wiki.secondlife.com/wiki/Rotation). One interesting thing it mentioned is this:

The main advantage of using quaternions is that they are not susceptible to gimbal lock.

That is interesting. Look at Wikipedia about gimbal lock: Gimbal Lock .

The essence is that, simple gimbals system cannot track motion continuously in some situations. For example, suppose you have a telescope. The base can rotate around freely, and the scope can rotate up and down. If you track some flying object that flew from eastern horizon to directly above your head (noon sun), and then suppose it made a sudden change of direction towards north, then your telescope will have a problem of following it. You'll need to twist the base 90° first before you can move the scope down.

The continuous tracking is important in many applications. Suppose your telescope is a gun turret, and the flying object is a ufo you want to shoot down. Or, suppose you are creating a projection system for Planetarium. You want to be able to project a point in the dome with continuous path, even if its path has sharp turns.

One solution is to provide a extra gimbal. For example, suppose our telescope again. It's base can turn around z-axes. The scope can turn aronud y-axes. But suppose we also make it so that the whole thing can turn around x-axes.

The gimbal lock problem also happens with 3D systems that uses gimbals of 3 axes (For example, gyroscope).

analogously, this problem occur in abstract math, when you present rotation by 3 angles around x, y, z axes too (For example, euler angles). If a point you want to trace makes a sharp turn at certain positions, the change in euler angles that track it cannot be continuous.

interestingly, Quaternions solves this, among other advantage and disadvantages.

This is quite interesting. I'm familiar with the gimbal lock problem but never knew there's a name to it. But most importantly, it never occured to me that this mechanical problem has a mathematical abstract meaning, as exhibited in using euler angle to track a point with continuous change requirement. It is interesting to note that quaternions solves this.