Quaternions

The big idea

A quaternion is a set of four numbers that describes a rotation. It sounds fancy, but the idea behind it is simple: any turn in 3D — however twisty — is the same as a single spin around one tilted axis. A quaternion packs that one spin into four numbers, usually written (x, y, z, w).

  • The x, y, z part points along the axis you spin around.
  • The w part encodes how far around you spin.

You do not have to do anything with these numbers. They are shown because they are the exact, unrounded truth about how a cube is turned, and because 3D tools and game engines expect rotations in this form.

Why four numbers instead of three?

Euler angles use three numbers (pitch, yaw, roll) and are easy to read, but they get confused in extreme poses (see Concept - Euler Angles). The fourth number sidesteps that. Quaternions never "lock up," they blend smoothly from one turn to the next, and the order of the axes does not matter. That is why the app stores every rotation as a quaternion and converts to Euler angles only for display.

A landmark to remember

The quaternion (0, 0, 0, 1) means "no rotation at all" — the cube sits square with the frame. Set Cube to World Rotation makes the world quaternion exactly that. So whenever you see (0, 0, 0, 1), the cube is lined up with that frame.

Radians vs. degrees

You will also see angles in radians in a few places — the angle window shows degrees and radians, and the TXT export lists Euler angles in both. Radians are just another way to measure angles: a half turn is about 3.14 radians (π), and a full turn about 6.28 (2π). Degrees are friendlier for people, radians for math, so you get both.

Where you see it

  • The cube window's Rotation row shows the quaternion as (W, X, Y, Z).
  • The TXT export lists each cube's world and local rotation as a quaternion (x, y, z, w).
  • The angle window shows the angle between two cubes in degrees and radians.

Related reading: Concept - Euler Angles, Action - Align a Cube's Rotation.