User:MarkMYoung/4-d rotation matrix

Rw
$$ R_w(\theta) \, = \, \frac{ \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & \cos \theta & -\sin \theta & \sin \theta \\ 0 & \sin \theta & \cos \theta & -\sin \theta \\ 0 & -\sin \theta & \sin \theta & \cos \theta \end{bmatrix} }{\sqrt[3]{2}\cos \theta} \, = \, \frac{ \begin{bmatrix} \sec \theta & 0 & 0 & 0 \\ 0 & 1 & -\tan \theta & \tan \theta \\ 0 & \tan \theta & 1 & -\tan \theta \\ 0 & -\tan \theta & \tan \theta & 1 \end{bmatrix} }{\sqrt[3]{2}} $$

Rx
$$ R_x(\theta) \, = \, \frac{ \begin{bmatrix} \cos \theta & 0 & -\sin \theta & -\sin \theta \\ 0 & 1 & 0 & 0 \\ \sin \theta & 0 & \cos \theta & -\sin \theta \\ \sin \theta & 0 & \sin \theta & \cos \theta \end{bmatrix} }{\sqrt[3]{2}\cos \theta} \, = \, \frac{ \begin{bmatrix} 1 & 0 & -\tan \theta & -\tan \theta \\ 0 & \sec \theta & 0 & 0 \\ \tan \theta & 0 & 1 & -\tan \theta \\ \tan \theta & 0 & \tan \theta & 1 \end{bmatrix} }{\sqrt[3]{2}} $$

Ry
$$ R_y(\theta) \, = \, \frac{ \begin{bmatrix} \cos \theta & -\sin \theta & 0 & -\sin \theta \\ \sin \theta & \cos \theta & 0 & \sin \theta \\ 0 & 0 & 1 & 0 \\ \sin \theta & -\sin \theta & 0 & \cos \theta \end{bmatrix} }{\sqrt[3]{2}\cos \theta} \, = \, \frac{ \begin{bmatrix} 1 & -\tan \theta & 0 & -\tan \theta \\ \tan \theta & 1 & 0 & \tan \theta \\ 0 & 0 & \sec \theta & 0 \\ \tan \theta & -\tan \theta & 0 & 1 \end{bmatrix} }{\sqrt[3]{2}} $$

Rz
$$ R_z(\theta) \, = \, \frac{ \begin{bmatrix} \cos \theta & -\sin \theta & -\sin \theta & 0 \\ \sin \theta & \cos \theta & -\sin \theta & 0 \\ \sin \theta & \sin \theta & \cos \theta & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} }{\sqrt[3]{2}\cos \theta} \, = \, \frac{ \begin{bmatrix} 1 & -\tan \theta & -\tan \theta & 0 \\ \tan \theta & 1 & -\tan \theta & 0 \\ \tan \theta & \tan \theta & 1 & 0 \\ 0 & 0 & 0 & \sec \theta \end{bmatrix} }{\sqrt[3]{2}} $$

The Determinant Used to Normalize the Rotation Matrices
$$det(R_4(\theta)) \, = \, 1$$ $$\, = \, x\cos \theta(x^{2}\cos^{2} \theta +x^{2}\sin^{2} \theta) +x\sin \theta(x^{2}\cos \theta\sin \theta -x^{2}\sin^{2} \theta) +x\sin \theta(x^{2}\cos \theta\sin \theta +x^{2}\sin^{2} \theta)$$ $$\, = \, x^{3}\cos^{3} \theta +x^{3}\cos \theta\sin^{2} \theta +x^{3}\cos \theta\sin^{2} \theta -x^{3}\sin^{3} \theta +x^{3}\cos \theta\sin^{2} \theta +x^{3}\sin^{3} \theta$$ $$\, = \, x^{3}[\cos^{3} \theta +3\cos \theta\sin^{2} \theta]$$ $$\, = \, x^{3}[\cos^{3} \theta +3\cos \theta(1 -\cos^{2} \theta)]$$ $$\, = \, x^{3}[\cos^{3} \theta +3\cos \theta -3\cos^{3} \theta]$$ $$\, = \, x^{3}[3\cos \theta -2\cos^{3} \theta]$$ $$\, = \, x^{3}[3\cos \theta -(1/2)(3\cos \theta +\cos{3\theta})]$$ $$\, = \, x^{3}[3\cos \theta -(3/2)\cos \theta+(1/2)\cos{3\theta}]$$ $$\, = \, x^{3}[(3\cos \theta +\cos{3\theta})/2]$$ $$\, = \, (2x^{3})[(3\cos \theta +\cos{3\theta})/4]$$ $$1 \, = \, (2x^{3})(\cos^{3} \theta)$$ $$x \, = \, \frac{1}{\sqrt[3]{2}\cos \theta}$$