Get the latest tech news

Rediscovering Quaternions


How do we represent a rotation in 3 dimensions? This is a surprisingly deep question, and one we can learn a lot from. Our goal will be to “rediscover” quaternions from first principles, building them up by exploring different representations and fixing the failures along the way.

On the Apollo 11 mission, astronaut Mike Collins had to manually reorient the spacecraft to prevent its Inertial Measurement Unit (IMU) from entering gimbal lock. The red spot is the “Gimbal Lock Region”, which if oriented this way, would cause the astronauts to lose attitude navigation, at least until they manually reset it. Every frame we calculate the set of angles that maximizes the distance to a singularity (the determinant of the Jacobian matrix) while always satisfying our desired rotation.

Get the Android app

Or read this on Hacker News