Home▸Algorithms & AI▸Quaternion Slerp Versus Euler-Angle Interpolation and Gimbal Lock

Quaternion Slerp Versus Euler-Angle Interpolation and Gimbal Lock

Turning an object from one orientation to another looks easy until you interpolate the three Euler angles: the rotation axis wobbles, the speed changes and, near a pitch of 90 degrees, yaw and roll become the same axis (gimbal lock). Set a start and end yaw, pitch and roll and watch two Blender-built aircraft make the same turn, one by linear Euler interpolation and one by quaternion slerp, with the nose paths traced on a sphere. Checked numerically against the matrix geodesic, matrix products and the Euler Jacobian determinant cos(pitch).

Algorithms & AI3DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 2D version
Quaternion Slerp Versus Euler-Angle Interpolation and Gimbal Lock ↗ Open standalone

Turning an object from one orientation to another looks easy until you interpolate the three Euler angles: the rotation axis wobbles, the speed changes and, near a pitch of 90 degrees, yaw and roll become the same axis (gimbal lock). Set a start and end yaw, pitch and roll and watch two Blender-built aircraft make the same turn, one by linear Euler interpolation and one by quaternion slerp, with the nose paths traced on a sphere. Checked numerically against the matrix geodesic, matrix products and the Euler Jacobian determinant cos(pitch).

⚙ Under the hood

Turning an object from one orientation to another looks easy until you interpolate the three Euler angles: the rotation axis wobbles, the speed changes and, near a pitch of 90 degrees, yaw and roll become the same axis (gimbal lock). Set a start and end yaw, pitch and roll and watch two Blender-built aircraft make the same turn, one by linear Euler interpolation and one by quaternion slerp, with the nose paths traced on a sphere. Checked numerically against the matrix geodesic, matrix products and the Euler Jacobian determinant cos(pitch).

QuaternionSlerpEuler AnglesGimbal Lock3D RotationInterpolationComputer Graphics

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)