This creates a rotation matrix, which rotates a vector about any arbitrary axis. The axis is specified as a
unit vector \(\vec v\). For example [1,0,0] rotates about the x axis, norm([1,1,0]) rotates about an axis 45°
to the x,y axes.
$$
R(\vec{v}, \theta)=
\begin{bmatrix}
v_x^2(1-\cos \theta) + \cos \theta & v_x v_y (1-\cos \theta) - v_z \sin \theta & v_x v_z (1-\cos \theta) + v_y \sin \theta \\
v_x v_y(1-\cos \theta) + v_z \sin \theta & v_y^2 (1-\cos \theta) + \cos \theta & v_y v_z (1-\cos \theta) - v_x \sin \theta \\
v_x v_z(1-\cos \theta) - v_y \sin \theta & v_y v_z (1-\cos \theta) + v_x \sin \theta & v_z^2 (1-\cos \theta) + \cos \theta \\
\end{bmatrix}
$$