where: ⋅ is the matrix dot product
and everything else as above
Creating A Rotation Matrix From Euler Angles (RPY)
A rotation expressed as Euler angles (which includes RPY or roll-pitch-yaw notation) can be easily converted into a rotation matrix. To represent a extrinsic rotation with Euler angles α, β, γ are about axes x, y, z can be formed with the equation:
Whilst converting a rotation expressed as Euler angles is relatively trivial (see above), it is not no simple to go the other way and convert a rotation matrix to Euler angles.
Javascript
THREE.js has a Euler class with the function .setFromRotationMatrix() which can convert a rotation matrix to Euler angles. The supported Euler angle orders are XYZ, YZX, ZXY, XZY, YXZ, ZYX, and it only supports intrinsic rotations.
Rotation Converter
Use the converter below to translate a 3D rotation between angle-axis, quaternion, rotation matrix and intrinsic Euler angles. Pick the radio button next to the form you want to enter; the other forms are computed.
Convert a 3D rotation between angle-axis, quaternion, rotation matrix, and intrinsic Euler angles. Pick the radio button next to the form you want to input; the others are computed. The 3D scene below shows the reference frame (blue) being rotated into the new frame (green).