Rotations in 3-D

CS 549 · session 2.2 · a rotation matrix, the order of rotations, and four spellings of one orientation. Drag in the picture to look around. Angles in degrees on the sliders, radians in every formula.
drag: orbit · wheel: zoom · right-drag: pan

Controls

elementary rotation about
30°
the same matrix, two questions:

Readouts

The columns of R are drawn: x_B, y_B, z_B are the red, green and blue arrows, and the numbers in each column are that arrow's world coordinates. Active: the book turns and its corner p goes somewhere new. Passive: nothing moves but the frame, and the same corner gets new coordinates. One matrix, two questions — say which one you are asking.

Default state: Rz(30°), the tray of the worked example (notes §5). Companion notes: notes.md.

Mode

The two rotations

a: about 90°
b: about 90°

Readouts

Left book: a then b, which is the product RbRa. The rotation applied first is written last because it acts on the vector first. Right book: b then a. Both start aligned with the world. After one step they have received different first turns. After two steps they have received the same two turns in opposite orders. The readouts always describe the books currently shown.

Default state: a = 90° about x, b = 90° about z, both already applied: the first columns are (0, 1, 0) and (0, 0, 1) — notes §4.5.

Axis and angle

axis û preset:
0°
90°
30°

Readouts

Four spellings of the same orientation: the matrix from Rodrigues' formula, the axis–angle pair, the unit quaternion r = (w, x, y, z) = (cos θ/2, sin θ/2 û), and the two RAI .g spellings. RAI and Drake put w first; SciPy and ROS put it last. Tick the box: the orange ghost is what the receiving library draws. No error is raised anywhere.

Default state: 30° about z — the tray, r = (0.9659, 0, 0, 0.2588) as on the slide; notes §3.4, §4.6, §5 (f).