SO(3) and 3D Rotations

Axis-angle, Euler angles, gimbal lock, and SLERP interpolation

The Geometry of 3D Rotations

Every turn of an object in space is an element of SO(3). Spin an axis, lock a gimbal, and see why the order of rotations matters.

Axis-Angle Explorer

Drag the axis on the unit sphere and adjust the angle slider. The luminous rod marks the axis, and spiral particles show which way the rotation turns.

Go deeper:The Geometry of 3D Rotations

SO(3), the group of 3D rotations, is one of the most important Lie groups in mathematics and physics. Every rotation can be specified by an axis (a unit vector) and an angle — the axis-angle representation. The space of all rotations forms a solid ball of radius π, where antipodal boundary points are identified (a rotation by π around axis k is the same as a rotation by π around −k).

Go deeper:Axis-Angle Explorer

Every 3D rotation is determined by an axis (a unit vector through the origin) and an angle of rotation around that axis. Drag the axis on the unit sphere and adjust the angle slider. Spiral particles show the rotation direction, and a luminous rod marks the rotation axis.

Euler Angles & Gimbal Lock

Push the middle angle β toward π/2. Two gimbal rings line up and flash red, and the degrees-of-freedom counter drops from 3 to 2.

Go deeper:Euler Angles & Gimbal Lock

Euler angles provide an alternative parameterization, but they suffer from gimbal lock — a singularity where two rotation axes align, reducing three degrees of freedom to two. This is not just a mathematical curiosity: it caused real problems for the Apollo spacecraft navigation system.

Euler angles decompose a rotation into three successive rotations around coordinate axes. But when the middle angle β approaches π/2, two gimbal rings align and a degree of freedom is lost — this is gimbal lock. Watch the DOF indicator drop from 3 to 2 as the rings align and flash red.

Key insight: Gimbal lock is not a bug in the implementation — it's a fundamental topological obstruction. No three-parameter smooth parameterization of SO(3) can avoid singularities (because SO(3) is not homeomorphic to ℝ³).

Non-Commutativity of Rotations

Pick two rotations and see them applied in both orders side by side. The glowing error vector shows how far apart the two results land.

Go deeper:Non-Commutativity of Rotations

Unlike rotations in 2D, 3D rotations do not commute: R₁R₂ ≠ R₂R₁ in general. Pick two rotations and see them applied in both orders side-by-side. The glowing “error vector” shows the angular distance between the two results.

Rodrigues' Rotation Formula

Sweep θ with the slider, or let it animate, and watch the three color-coded pieces of the formula add up to the rotated vector.

Go deeper:Rodrigues' Rotation Formula

Rodrigues' formula gives a closed-form expression for rotating a vector v by angle θ around axis k: v′ = v cosθ + (k × v) sinθ + k(k · v)(1 − cosθ). The three color-coded vector components animate as θ sweeps, showing how each term contributes to the final rotated vector.

SLERP: Geodesic Interpolation

Slide t to interpolate between two rotations and compare SLERP with naive linear interpolation: SLERP turns at a constant rate, while the linear path speeds up and slows down.

Go deeper:SLERP: Geodesic Interpolation

To smoothly interpolate between two rotations, SLERP (Spherical Linear Interpolation) traces a geodesic — the shortest path on the rotation manifold. Compare SLERP (which maintains constant angular velocity) with naive linear interpolation (which accelerates and decelerates). Ghost afterimages show the interpolation path at regular intervals.

Key Takeaways

  • Every 3D rotation has an axis and an angle; together they fill a ball with glued boundary.
  • Euler angles always have a gimbal-lock singularity, because of the shape of SO(3).
  • In 3D, R₁R₂ ≠ R₂R₁: the order of rotations matters.
  • SLERP follows the shortest path between rotations at constant speed.

Spot a mistake or have an idea?

Search