# Rotation Transformation

There is a different rotation transformation matrix for each axis.

$\M{R}_x=\begin{squeezematrix} 1 & 0 & 0 & 0 \\ 0 & \red{c} & \red{t} & 0 \\ 0 & \red{s} & \red{c} & 0 \\ 0 & 0 & 0 & 1 \\ \end{squeezematrix} \quad \M{R}_y=\begin{squeezematrix} \red{c} & 0 & \red{s} & 0 \\ 0 & 1 & 0 & 0 \\ \red{t} & 0 & \red{c} & 0 \\ 0 & 0 & 0 & 1 \\ \end{squeezematrix} \quad \M{R}_z=\begin{squeezematrix} \red{c} & \red{t} & 0 & 0 \\ \red{s} & \red{c} & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{squeezematrix}$ $c = \cos a\qquad s = \sin a\qquad t = -\sin a$

This is generalizable, and a transformation matrix for an arbitrary 3D axis can be generated by the matrix library.