# PlanetPhysics/Euler Angles

An Euler angle sequence is a rotation matrix that is completely determined by three parameters, called Euler angles. These Euler angles are represented by the $\phi$ , $\theta$ and $\psi$ variables with each corresponding to a rotation about an axis. There are several different conventions. Only one will be shown here, since it is more important to understand the underlying math thoroughly.
A list of the Euler angle rotation matrices for different sequences
Euler 123 sequence \\
$R_{3}(\psi )R_{2}(\theta )R_{1}(\phi )=\left[{\begin{matrix}c_{\psi }c_{\theta }&c_{\psi }s_{\theta }s_{\phi }+s_{\psi }c_{\phi }&-c_{\psi }s_{\theta }c_{\phi }+s_{\psi }s_{\phi }\\-s_{\psi }c_{\theta }&-s_{\psi }s_{\theta }s_{\phi }+c_{\psi }c_{\phi }&s_{\psi }s_{\theta }c_{\phi }+c_{\psi }s_{\phi }\\s_{\theta }&-c_{\theta }s_{\phi }&c_{\theta }c_{\phi }\end{matrix}}\right]$
Euler 132 sequence \\
$R_{2}(\psi )R_{3}(\theta )R_{1}(\phi )=\left[{\begin{matrix}c_{\psi }c_{\theta }&c_{\psi }s_{\theta }c_{\phi }+s_{\psi }s_{\phi }&c_{\psi }s_{\theta }s_{\phi }-s_{\psi }c_{\phi }\\-s_{\theta }&c_{\theta }c_{\phi }&c_{\theta }s_{\phi }\\s_{\psi }c_{\theta }&s_{\psi }s_{\theta }c_{\phi }-c_{\psi }s_{\phi }&s_{\psi }s_{\theta }s_{\phi }+c_{\psi }c_{\phi }\end{matrix}}\right]$
Euler 121 sequence \\
$R_{1}(\psi )R_{2}(\theta )R_{1}(\phi )=\left[{\begin{matrix}c_{\theta }&-s_{\theta }s_{\phi }&s_{\theta }c_{\phi }\\-s_{\psi }s_{\theta }&c_{\psi }c_{\phi }-s_{\psi }c_{\theta }s_{\phi }&c_{\psi }s_{\phi }+s_{\psi }c_{\theta }c_{\phi }\\-s_{\theta }c_{\psi }&-s_{\psi }c_{\phi }-c_{\psi }c_{\theta }s_{\phi }&-s_{\psi }s_{\phi }+c_{\psi }c_{\theta }c_{\phi }\end{matrix}}\right]$
Euler 131 sequence \\
$R_{1}(\psi )R_{3}(\theta )R_{1}(\phi )=\left[{\begin{matrix}c_{\theta }&s_{\theta }c_{\phi }&s_{\theta }s_{\phi }\\-c_{\psi }s_{\theta }&c_{\psi }c_{\theta }c_{\phi }-s_{\psi }s_{\phi }&c_{\psi }c_{\theta }s_{\phi }+s_{\psi }c_{\phi }\\s_{\psi }s_{\theta }&-s_{\psi }c_{\theta }c_{\phi }-c_{\psi }s_{\phi }&-s_{\psi }c_{\theta }s_{\phi }+c_{\psi }c_{\phi }\end{matrix}}\right]$
Euler 213 sequence \\
$R_{3}(\psi )R_{1}(\theta )R_{2}(\phi )=\left[{\begin{matrix}c_{\psi }c_{\phi }+s_{\psi }s_{\theta }s_{\phi }&s_{\psi }c_{\theta }&-c_{\psi }s_{\phi }+s_{\psi }s_{\theta }c_{\phi }\\-s_{\psi }c_{\phi }+c_{\psi }s_{\theta }s_{\phi }&c_{\psi }c_{\theta }&s_{\psi }s_{\phi }+c_{\psi }s_{\theta }c_{\phi }\\c_{\theta }s_{\phi }&-s_{\theta }&c_{\theta }c_{\phi }\end{matrix}}\right]$
Euler 231 sequence \\
$R_{1}(\psi )R_{3}(\theta )R_{2}(\phi )=\left[{\begin{matrix}c_{\theta }c_{\phi }&s_{\theta }&-c_{\theta }s_{\phi }\\-c_{\psi }s_{\theta }c_{\phi }+s_{\psi }s_{\phi }&c_{\psi }c_{\theta }&c_{\psi }s_{\theta }s_{\phi }+s_{\psi }s_{\theta }s_{\phi }\\s_{\psi }s_{\theta }c_{\phi }+c_{\psi }s_{\phi }&-s_{\psi }c_{\theta }&-s_{\psi }s_{\theta }s_{\phi }+c_{\psi }c_{\phi }\end{matrix}}\right]$
Euler 212 sequence \\
$R_{2}(\psi )R_{1}(\theta )R_{2}(\phi )=\left[{\begin{matrix}c_{\psi }c_{\phi }-s_{\psi }c_{\theta }s_{\phi }&s_{\psi }s_{\theta }&-c_{\psi }s_{\phi }-s_{\psi }c_{\theta }c_{\phi }\\s_{\theta }s_{\phi }&c_{\theta }&s_{\theta }c_{\phi }\\s_{\psi }c_{\phi }+c_{\psi }c_{\theta }s_{\phi }&-c_{\psi }s_{\theta }&-s_{\psi }s_{\phi }+c_{\psi }c_{\theta }c_{\phi }\end{matrix}}\right]$
Euler 232 sequence \\
$R_{2}(\psi )R_{3}(\theta )R_{2}(\phi )=\left[{\begin{matrix}c_{\psi }c_{\theta }c_{\phi }-s_{\psi }s_{\phi }&c_{\psi }s_{\theta }&-c_{\psi }c_{\theta }s_{\phi }-s_{\psi }c_{\phi }\\-s_{\theta }c_{\phi }&c_{\theta }&s_{\theta }s_{\phi }\\s_{\psi }c_{\theta }c_{\phi }+c_{\psi }s_{\phi }&s_{\psi }s_{\theta }&-s_{\psi }c_{\theta }s_{\phi }+c_{\psi }c_{\phi }\end{matrix}}\right]$
Euler 312 Sequence \\
$R_{2}(\psi )R_{1}(\theta )R_{3}(\phi )=\left[{\begin{matrix}c_{\psi }c_{\phi }-s_{\psi }s_{\theta }s_{\phi }&c_{\psi }s_{\phi }+s_{\psi }s_{\theta }c_{\phi }&-s_{\psi }c_{\theta }\\-s_{\phi }c_{\theta }&c_{\theta }c_{\phi }&s_{\theta }\\s_{\psi }c_{\phi }+c_{\psi }s_{\theta }s_{\phi }&s_{\psi }s_{\phi }-c_{\psi }s_{\theta }c_{\phi }&c_{\psi }c_{\theta }\end{matrix}}\right]$
Euler 321 sequence \\
$R_{1}(\psi )R_{2}(\theta )R_{3}(\phi )=\left[{\begin{matrix}c_{\theta }c_{\phi }&c_{\theta }s_{\phi }&-s_{\theta }\\-c_{\psi }s_{\phi }+s_{\psi }s_{\theta }c_{\phi }&c_{\psi }c_{\phi }+s_{\psi }s_{\theta }s_{\phi }&s_{\psi }c_{\theta }\\s_{\psi }s_{\phi }-c_{\psi }s_{\theta }c_{\phi }&-s_{\psi }c_{\phi }+c_{\psi }s_{\theta }s_{\phi }&c_{\psi }c_{\theta }\end{matrix}}\right]$
Euler 313 sequence \\
$R_{3}(\psi )R_{1}(\theta )R_{3}(\phi )=\left[{\begin{matrix}c_{\psi }c_{\phi }-s_{\psi }s_{\phi }c_{\theta }&c_{\psi }s_{\phi }+s_{\psi }c_{\theta }c_{\phi }&s_{\psi }s_{\theta }\\-s_{\psi }c_{\phi }-c_{\psi }s_{\phi }c_{\theta }&-s_{\psi }s_{\phi }+c_{\psi }c_{\theta }c_{\phi }&c_{\psi }s_{\theta }\\s_{\theta }s_{\phi }&-s_{\theta }c_{\phi }&c_{\theta }\end{matrix}}\right]$
Euler 323 sequence \\
$R_{3}(\psi )R_{2}(\theta )R_{3}(\phi )=\left[{\begin{matrix}c_{\psi }c_{\theta }c_{\phi }-s_{\psi }s_{\phi }&c_{\psi }c_{\theta }s_{\phi }+s_{\psi }c_{\phi }&-c_{\psi }s_{\theta }\\-s_{\psi }c_{\theta }c_{\phi }-c_{\psi }s_{\phi }&-s_{\psi }c_{\theta }s_{\phi }+c_{\psi }c_{\phi }&s_{\psi }s_{\theta }\\s_{\theta }c_{\phi }&s_{\theta }s_{\phi }&c_{\theta }\end{matrix}}\right]$