<s>[INST] How to understand and create quaternions? I have to multiply two quaternions to calculate a so called spherical linear interpolation between two $R^3$ coordinate systems within the interval $t = [0, 1]$.

I understand how to do the calculation of quaternions basicly works and how to do the slerp. There is a lot of literature available.
But I don't know how to get started: How to create initial quaternions from given coordinate system axis and angles? I basicly fail to understand the meaning of quaternions I guess.
 [/INST] Okay, I think I got it. The quaternion is created like this:
$$q = \begin{pmatrix} a_x \cdot \sin{\frac{\alpha}{2}} \\ a_y \cdot \sin{\frac{\alpha}{2}} \\ a_z \cdot \sin{\frac{\alpha}{2}} \\ \cos{\frac{\alpha}{2}} \end{pmatrix}$$
I have one quaternion for each axis. Each axis is a vector (with three coordinates) and is aligned along a certain angle. That's six quaternions in total for two coordinate systems:
$$q_{x1} = \begin{pmatrix} \sin{\frac{\alpha_{x1}}{2}} \\ 0 \\ 0 \\ \cos{\frac{\alpha_{x1}}{2}} \end{pmatrix}, q_{y1} = \begin{pmatrix} 0 \\ \sin{\frac{\alpha_{y1}}{2}} \\ 0 \\ \cos{\frac{\alpha_{y1}}{2}} \end{pmatrix}, q_{z1} = \begin{pmatrix} 0 \\ 0 \\ \sin{\frac{\alpha_{z1}}{2}} \\ \cos{\frac{\alpha_{z1}}{2}} \end{pmatrix} $$
and
$$q_{x2} = \begin{pmatrix} \sin{\frac{\alpha_{x2}}{2}} \\ 0 \\ 0 \\ \cos{\frac{\alpha_{x2}}{2}} \end{pmatrix}, q_{y2} = \begin{pmatrix} 0 \\ \sin{\frac{\alpha_{y2}}{2}} \\ 0 \\ \cos{\frac{\alpha_{y2}}{2}} \end{pmatrix}, q_{z2} = \begin{pmatrix} 0 \\ 0 \\ \sin{\frac{\alpha_{z2}}{2}} \\ \cos{\frac{\alpha_{z2}}{2}} \end{pmatrix} $$
The quaternions above are normalized unit quaternions and already simplified, because for the x-axis $a_x = 1$, $a_y = 0$ and $a_z = 0$, and so on: $ a_x^2 + a_y^2 + a_z^2 = 1$.
</s>