Quaternion Slerp Versus Euler-Angle Interpolation: Nose Paths and Speed (2D)
The same two interpolation routes seen from above: nose paths of the Euler and slerp routes on a unit sphere and the rotation speed along each. Same quaternion and Euler maths and numerical checks as the 3D version.
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).
The same two interpolation routes seen from above: nose paths of the Euler and slerp routes on a unit sphere and the rotation speed along each. Same quaternion and Euler maths and numerical checks as the 3D version.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install