From an outsider’s point of view, Euler angles seemed like a relatively intuitive way to describe rotations. 3 axes, with some angle or rotation around each is about as easy as it gets when it comes to representing the rotation of a 3-D object. Yet, in industry they aren’t used.

Instead, a hyper-complex number system called Quaternions are used, which seem far less intuitive. There is a reason for that. I want to briefly motivate the utility behind Quaternions by describing the problem with Euler angles.

Consider this picture, which uses 3 gimbles to visualize the Euler Angle System.

Green gimble is Z, blue is the Y, red is the X.  This is the aerospace system, meaning that Z axis, is the highest in the hierarchy.

Green gimble is Z, blue is the Y, red is the X. This is the aerospace system, meaning that Z axis, is the highest in the hierarchy.

There are three axes which we can rotate about: x,y,z by the angles $\phi,\theta,\psi$ respectively. The order of rotations determines the the “level” of each axis. One way to visualize this is with the gimble system. In the picture above, the x gimbal is the “highest” in the hierarchy. This means that when a rotation is applied to the x axis, the x gimble spins along with all gimbles inside of it. The direct child of x, in this case y, would only rotate itself and its descendants, but not z.

In the aerospace system, where a rotation is represented as $R_xR_yR_zx$ where the rotation around Z is the first rotation which moves the gimbles inside of it, then the Y rotation rotates only x gimble, and the x rotation only rotates an imaginary arrow inside of it.

Now I want you to consider the following rotation sequence in the system depicted in the picture.

  1. Rotate 0 degrees around Z ($\psi = 0)$
  2. Rotate $\pi/2$ degrees around Y

This is what results:

One example of Gimble Lock where the z axis and x axis have aligned

One example of Gimble Lock where the z axis and x axis have aligned

Notice that now, the X and Z axis are aligned. Rotating about either axis does the same thing. In other words, we’ve lost an axis of rotation. This is a problem because there are angles we can no longer reach. Software attempts to overcome this by setting bounds on each rotation angle and working conditionally around gimble locks. These workaround often have strange affects however, like an arm jumping a circle very quickly in FIFA as it approaches the $=\pi/2$ angle (or lots of other video games for that matter).

Quaternions, although unfamiliar, don’t have the same pitfalls, and are therefore actually easier to represent rotations in 3d space with.