THE QUATERNION BIT
The ship stores no latitude, longitude or xyz. Its whole pose — where it sits on the sphere and which way it points — is a single unit quaternion q, a rotation of the planet’s reference frame:
position = q·(0,0,R) heading = q·(0,1,0)
Momentum is an angular velocity vector ω through the planet’s core. Thrust pushes ω along the axis normal×forward; coasting just keeps rotating q about it — so every drift traces a great circle. No poles, no seams, no gimbal lock:
thrust: ω += (n̂ × f̂)·a·dt
each frame: q ← Δq(ω̂, |ω|dt) · q
Quaternions extend complex numbers with three imaginary units. One rule generates everything above:
i² = j² = k² = ijk = −1
Sir William Rowan Hamilton saw that rule in a flash on 16 October 1843, while strolling with his wife along the canal in Dublin — and, afraid it would slip away, scratched it into the stone of Broome Bridge. A plaque still marks the spot.
PRESS Q TO CLOSE