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.

Last updated
Update history (1)
  • Improved Pieces of the right cube that land in the same slot now get a purple outline, and their number is shown; their faces no longer flicker in stripes. A new box lets you type a sequence of moves and run it from the solved state. Scramble also puts its 20 moves there, so you can recreate the same scramble as often as you like.
See all updates →
  • Drag a face of the cube to turn a layer in the direction you drag. Drag the background to rotate the view; hold Ctrl or ⌘ and scroll, or pinch with two fingers, to zoom, while scrolling alone moves the page. On a phone or tablet, one finger still turns a face. One finger on the background scrolls the page, and two fingers turn the view (in the "Expand" view, one finger on the background turns it too).
  • 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.
  • Type a sequence such as R U R′ U′ in "Type a sequence of moves" and press "Solve first, then run" to run it from the solved state. "Scramble" also puts its 20 moves in the box, so you can reproduce the same scramble as often as you like.
  • 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.