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).
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).
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).
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install