Euler angles to rotation matrix
Outlined in Combining rotation matrices into one:
Usually what interests us is a rotation matrix comprised of exactly one , , and each, because these directly correlate to Euler angles and quaternions. However, the order in which we multiply them matters and affects the end result. Therefore there exists different general rotation matrices for different rotation orders.
Link to original
In particular, we calculate , , and , and then we multiply them together in whichever order is specified.
Rotation matrix to Euler angles
- is bounded between
- , so both and would satisfy solution
- , meaning we take in as first parameter, then .
Rotation matrix to quaternion
The correct version?
I guess this method is more thorough. Note that and , , .
Quaternion to rotation matrix
The columns of the rotation matrix define the basis vectors of the rotated frame. Therefore, we can begin with the identity matrix and apply the quaternion to each of its columns. This will give us the corresponding rotation matrix.