Game dev
Saved & recent

Quaternion

Related terms: Euler angles, gimbal lock

Four numbers (x, y, z, w) that store a 3D rotation as one turn around one axis. You rarely read the numbers. You build them from an axis and an angle, and combine them by multiplying.

The alternative is Euler angles: three separate turns around X, Y and Z. Those are easy to read but can hit gimbal lock, where two axes line up and one degree of freedom is lost. Quaternions do not have that problem and blend smoothly.

Further reading
Jeremiah van Oosten: Understanding Quaternions
rotation axis 90° turn start pose
One quaternion rotates the arm 90° about the tilted blue axis. The violet curve follows a point at the tip.

View in the full Game dev collection