Taroimo Science Lab日本語

All simulationsMenu

← All simulations

3D Rotation Lab: Quaternions and Euler Angles

Exaggerated display3DPlay

Two copies of a 3×3 rotating puzzle play the same moves side by side: one combines its rotations with quaternions, the other with Euler angles. As only one of them falls apart, check with numbers and equations how 3D rotations must be combined, and what gimbal lock really is.

  • Drag a face of the cube to turn a layer in the direction you drag. Drag the background to rotate the view, and use the wheel or pinch to zoom.
  • You can also turn layers with the R, L, U, D, F and B buttons and with M, E and S, which turn the middle layers. A ′ means the reverse turn.
  • Press "Scramble" for 20 random moves, and "Solve (retrace the moves)" to undo them by playing the history backwards with each move reversed. "Undo one move" is also available.
  • Use "What to view" to switch between the side-by-side comparison, the puzzle on its own, and the gimbal. In the comparison, choose how the right cube combines rotations with "How the right cube combines rotations".
  • Tap a piece to see its quaternion, rotation axis and angle, and rotation matrix under "Numbers". For the right cube, its Euler angles or matrix are shown as well.
  • Use "Display" to switch between normal, skeleton and translucent, and "Shape" to switch between the color cube and shape mode, which uses cuboids of different sizes.
  • In the gimbal view, turn the three nested rings with the yaw, pitch and roll sliders. Press "Set pitch to 90°" to put them in gimbal lock, then "Turn the plane 15° about the world zz axis" to watch what the rings do.