Euler angles vs. quaternions · Gimbal lock demo · Smooth interpolation
Euler angles (yaw, pitch, roll) are intuitive but suffer from gimbal lock: when two rotation axes align (e.g. pitch = ±90°), one degree of freedom is lost and rotations become erratic. Quaternions — four-dimensional numbers q = w + xi + yj + zk discovered by Hamilton in 1843 — represent rotations without singularities. SLERP (Spherical Linear intERPolation) smoothly interpolates between two quaternion orientations along the shortest arc on the 4D hyper-sphere, producing constant-angular-velocity motion with no jitter.
William Rowan Hamilton carved the quaternion multiplication rules (i² = j² = k² = ijk = −1) into Brougham Bridge in Dublin on 16 October 1843. Quaternions are now essential in aerospace (spacecraft ADCS), robotics, and every 3D game engine — Unity, Unreal, and Godot all default to quaternion rotations internally. The Apollo guidance computer used a gimbal-based inertial measurement unit; near gimbal lock the astronauts had to reorient the spacecraft to avoid losing navigation.