Which vector rotation is correct?

77 Views Asked by At

If my axis extends from (0,0,0) to (0,0,1), my candidate vector is (1,0,0), and I rotate the candidate vector about the axis for 120 degrees, what will be the location of the rotated vector?

According to this link it should be (-0.5, 0.86, 0).

According to this link it should be (0, 1, 0).

What am I missing here?

1

There are 1 best solutions below

0
On BEST ANSWER

General case

If $\mathbf{\hat{u}}$, $\mathbf{\hat{v}}$ define a plane of normal $\mathbf{\hat{w}} \equiv \frac{\mathbf{\hat{u}} \times \mathbf{\hat{v}}}{||\mathbf{\hat{u}} \times \mathbf{\hat{v}}||}$, the counterclockwise rotation matrix around $\mathbf{\hat{w}}$ is:

$$ \mathbf{R}(\theta,\mathbf{\hat{w}}) = \mathbf{I} + (\sin\theta)\mathbf{W} + (1-\cos\theta)\mathbf{W}\cdot\mathbf{W} $$

known as Rodrigues' Rotation Formula, where we define the matrices:

$$ \mathbf{I} \equiv \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{bmatrix}, \quad \quad \quad \mathbf{W} \equiv \begin{bmatrix} 0 & -w_3 & w_2 \\ w_3 & 0 & -w_1 \\ -w_2 & w_1 & 0 \\ \end{bmatrix}. $$

Therefore, the matrix that rotates $\mathbf{\hat{u}}$ to the direction of $\mathbf{\hat{v}}$ is nothing but $\mathbf{R}(\arccos(\mathbf{\hat{u}}\cdot\mathbf{\hat{v}}),\mathbf{\hat{w}})$.


Specific case

Since $\theta = \frac{2\pi}{3}$ and $\mathbf{\hat{w}} = \begin{bmatrix}0\\0\\1\end{bmatrix}$, then:

$$ \mathbf{R} = \begin{bmatrix} -\frac{1}{2} & -\frac{\sqrt{3}}{2} & 0 \\ \frac{\sqrt{3}}{2} & -\frac{1}{2} & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} \quad \quad \Rightarrow \quad \quad \mathbf{R}\cdot\begin{bmatrix}1\\0\\0\end{bmatrix} = \begin{bmatrix}-\frac{1}{2}\\\frac{\sqrt{3}}{2}\\0\end{bmatrix} $$

which is what was wanted.