Quaternions & Rotation
Explore quaternion and Euler rotations with live 3D gimbals.
About this tool
Enter quaternion components in scalar-first order (w,x,y,z), or choose Euler and drag the linked angle sliders. Numeric fields retain precise input. The cube and rings update directly; valid mode changes preserve orientation. Euler rotations are intrinsic YXZ: yaw about Y, pitch about the current X, roll about the current Z. Angles are in degrees, yaw/roll −180…180 and pitch −90…90.
Any finite nonzero quaternion is normalized without clipping its components; q and −q encode the same orientation. Settings contains normalized components, the Euler decomposition, the rings toggle and a gimbal-lock example. At pitch ±90°, the outer yaw and inner roll axes align; only their combined effect remains. The example 30°,90°,30° is a 90° X rotation. The quaternion remains valid, while a canonical locked Euler decomposition chooses roll=0.
Green Y, red X and blue Z rings follow the nested rotation hierarchy. Positive cube faces use the same colors, negative faces are darker. Drag or one finger orbits; Ctrl/Meta-wheel or two-finger pinch zooms; ordinary wheel scrolls the page. Fit resets the camera only. The view adapts to available space and screen aspect without stretching geometry. PNG captures the clicked view with normalized quaternion values.
Raw inputs and the rings checkbox persist through the shared browser adapter; camera and computed scene do not. Invalid input hides the old orientation without destroying the renderer. WebGL is required for the image, not the numbers in Settings. Rendering pauses while hidden and rests between interactions. Float64, ten significant numeric display digits and GPU Float32 rendering; no arbitrary precision. This is an orientation viewer, not a mechanical dynamics simulation. Euler conventions · quaternion order and normalization.