Rotation Visualizer

SO(3) Cesium-Lab
Input Source
w
x
y
z
Presets
X body axis
Y body axis
Z body axis
─────────
drag to orbit
scroll to zoom
Output
Quaternion [w, x, y, z]
w 1.0000
x 0.0000
y 0.0000
z 0.0000
[x,y,z,w] = 0, 0, 0, 1
Rotation Matrix
100 010 001
✓ SO(3) det = 1.000
Euler ZYX (yaw-pitch-roll)
Z 0.0°
Y 0.0°
X 0.0°
⚠ gimbal lock
Axis-Angle
x 0.0000
y 0.0000
z 1.0000
θ 0.00°
Reference

A rotation is a linear map R: ℝ³ → ℝ³ preserving length and orientation. The set of all valid rotations forms the group SO(3) — Special Orthogonal group in 3D.

SO(3) Constraints
R·Rᵀ = I (orthonormal columns) det(R) = +1 (orientation-preserving) 9 parameters, 3 DOF (6 constraints)
Quaternion → Rotation Matrix
q = [w, x, y, z], ‖q‖ = 1 R₀₀ = 1 - 2(y²+z²) R₀₁ = 2(xy - wz) R₀₂ = 2(xz + wy) ... 4 params, 3 DOF (unit constraint)
Antipodal: q and -q represent the same rotation. Canonical form: w ≥ 0.
Rodrigues' Formula (axis-angle)
R = I + sin θ·[k]× + (1-cos θ)·[k]ײ [k]× = skew-symmetric matrix of axis k Minimal 3-param rep: θ·k̂
Singularity at θ = 0 (axis undefined) and θ = π (two antipodal axes).
Euler ZYX (aerospace)
R = Rz(ψ) · Ry(θ) · Rx(φ) ψ = yaw, θ = pitch, φ = roll 3 params, but NOT injective
Gimbal lock at θ = ±90°: rank of Jacobian drops, one DOF lost. This is why spacecraft use quaternions.
Quaternion Composition
q₁₂ = q₁ ⊗ q₂ (Hamilton product) = [w₁w₂ - v₁·v₂, w₁v₂ + w₂v₁ + v₁×v₂] Equivalent to R₁ · R₂