I have a question in computing the transformation in 3D space about a rotation axis passing through the origin matrix. I have no idea what this is about and I am looking for some tips and answers.
Given that the axis of rotation is a vector from (0,0,0) to (1,1,1) , write a rotation transformation matrix that is rotated inversely by 30 degrees around the axis,and calculate the new coordinates of the space point (1,1,2) after rotating around that axis.
Thank you very much.
If the axis of rotation is along the unit vector $\mathbf{a}$, and the angle of rotation is $\theta$, then the rotation matrix is given by the Rodrigues' rotation matrix formula, which is
$\mathbf{R} = \mathbf{aa}^T + (\mathbf{I} - \mathbf{aa}^T ) \cos(\theta) + \mathbf{S_a} \sin(\theta) $
where
$\mathbf{S_a} = \large \begin{bmatrix} 0 && - a_z && a_y \\a_z && 0 && -a_x \\ -a_y && a_x && 0 \end{bmatrix} $
In this example, the unit vector along the axis is
$ \mathbf{a} = \dfrac{ [1,1,1]^T}{\sqrt{3} } $
Therefore,
$\mathbf{aa}^T = \dfrac{1}{3} \begin{bmatrix} 1 && 1 && 1 \\ 1 && 1 && 1 \\ 1 && 1 && 1 \end{bmatrix} $
and
$( \mathbf{I} - \mathbf{aa}^T ) = \dfrac{1}{3} \begin{bmatrix} 2 && - 1 && -1 \\ -1 && 2 && -1 \\ -1 && -1 && 2 \end{bmatrix} $
and
$ \mathbf{S_a} = \dfrac{1}{\sqrt{3}} \begin{bmatrix} 0 && -1 && 1 \\ 1 && 0 && -1 \\ -1 && 1 && 0 \end{bmatrix} $
Putting all the pieces together, the rotation matrix is given by
$\mathbf{R} = \dfrac{1}{3} \begin{bmatrix} 1 + 2 \cos \theta && 1 - \cos \theta - \sqrt{3} \sin \theta && 1 - \cos \theta +\sqrt{3} \sin \theta \\ 1 - \cos \theta +\sqrt{3} \sin \theta && 1 + 2 \cos \theta && 1 - \cos \theta - \sqrt{3}\sin \theta \\ 1 - \cos \theta -\sqrt{3} \sin \theta && 1 - \cos \theta + \sqrt{3} \sin \theta && 1 + 2 \cos \theta \end{bmatrix}$
The image of the vector $\mathbf{P} = [1,1,2]^T $ under an "inverse" rotation of $30^\circ$ corresponds to the rotation angle being $\theta = -30^\circ$. The image $\mathbf{P'}$ is given by
$ \mathbf{P'} = \mathbf{RP } $
All you have to do is substitute the value of $\theta$ in the rotation matrix expression and evaluate the multiplication of the matrix $\mathbf{R}$ and the vector $\mathbf{P}$.