Skip to main content

Rotation Calculator

Rotation 1

Euler Angles
α:0.000000
β:0.000000
γ:0.000000
Quaternion
w:1.000000
x:0.000000
y:0.000000
z:0.000000
Axis-Angle
Axis:
x:0.000000
y:0.000000
z:0.000000
Angle (deg):
0.000000
Rotation Matrix
1.000
0.000
0.000
0.000
1.000
0.000
0.000
0.000
1.000

Note that the Matrix-To-Euler conversions are calculated using code adapted from Ken Shoemake, Graphics Gems IV.

Intrinsic vs Extrinsic angles

When expressing a rotation as Euler angles, we can choose whether the angles are intrinsic (relative to the current axes orientation) or extrinsic (relative to the static frame). This calculator assumes intrinsic rotations. If you need to use an extrinsic rotation, simply select the order that is reverse to what you want and then read the values in reverse order. For example, If you want an extrinsic rotation around Z, Y, X you would select the XYZ option but then enter/read the values from bottom to top (i.e. Z, then Y, then X) and it should be correct.

FOR THOSE USING ROS: The ROS standard (e.g. in URDF and transform libraries) is to use XYZ Extrinsic rotations. This is expressed as "roll-pitch-yaw", with X-forward (roll), Y-left (pitch), and Z-up (yaw).

So, any time you want ROS angles out of this calculator, you should select the ZYX option and then enter/read the values from bottom to top (i.e. X, then Y, then Z).

How does this work?

Whatever you enter in the input is converted to its matrix representation, and then converted back to the other formats below. Being stored as a matrix also lets us multiply (and divide/invert) the rotations to solve for the unknown in the equation.

To Do / Possible Improvements
  • Option for extrinsic rotations
  • Option to show cumulative multiplication results
  • Version for transformation matrices
  • Export in some useful format
  • Make result column more distinct in dark mode
  • Dropdown on 3D view for visualising different representations (e.g. axis and angle, each Euler angle)
  • Why does the Three.js view sometimes crash?