[3D Rotation Matrix] Euler angle
- Euler angle

- Euler angles describe a sequence of rotations around the axes of a 3D coordinate system — typically:
|

- This keeps the x-value the same (notice first row is [1 0 0]).
- It rotates the point in the YZ plane.
- So imagine you're tilting your head sideways — that's roll.
- This keeps the y-value the same.
- It rotates the point in the XZ plane.
- Like when a plane tilts its nose up or down — that's pitch.
- This keeps the z-value the same.
- It rotates the point in the XY plane.
- Like turning your body left or right while standing — that's yaw.
- Combining Rotations:
- This means: rotate around x, then y, then z — in that order. The order matters a lot because matrix multiplication is not commutative (i.e., AB≠BA).
- In here, the R is the elements of a 3×3 rotation matrix and looks like this:
Think of the matrix like a set of three new axes (basis vectors) after rotation:
Column 1: new x-axis direction
Column 2: new y-axis direction
Column 3: new z-axis direction
So:
Each column vector is a rotated unit axis.
For example, Rotation About the Z-axis:
Now, look at each element:
- Gimbal Lock
It happens when
- The pitch angle is ±90°
- Two rotation axes align, and you lose one degree of freedom
- The system can't distinguish between different roll/yaw combinations — multiple combinations of α and γ result in the same orientation.