Rotation:
Provided a vector $\vec{S}$,considering rotating the orthogonal base vectors $\{\hat{e_1},\hat{e_2},\hat{e_3}\}$ into new orthogonal base vectors $\{\tilde{e_1},\tilde{e_2},\tilde{e_3}\}$, such that $\tilde{e_3}=\frac{\vec{S}}{\left|\vec{S}\right|}$, and these are under the conventional right-hand axises system.
Conclusion:
$cos\alpha = \frac{\vec{S}_x}{\left|\vec{S}\right|}$,
$cos\beta = \frac{\vec{S}_y}{\left|\vec{S}\right|}$,
$cos\gamma = \frac{\vec{S}_z}{\left|\vec{S}\right|}$,
$$ \left[\begin{matrix} cos\gamma & cos\alpha & cos \beta \\ cos\beta & cos\gamma & cos \alpha\\ cos\alpha & cos \beta & cos\gamma\end{matrix}\right] \left[\begin{matrix} \hat{e_1}\\ \hat{e_2}\\ \hat{e_3}\end{matrix}\right] = \left[\begin{matrix} \tilde{e_1}\\ \tilde{e_2}\\ \tilde{e_3}\end{matrix}\right] $$
Deduction:
Considering the unit vector in the direction of $\vec{S}$, $\vec{u}=\frac{\vec{S}}{\left|\vec{S}\right|}$.
Then it‘s clear that $\vec{u}=cos\alpha \hat{e_1}+cos\beta \hat{e_2} + cos\gamma \hat{e_3}$. Thus $\tilde{e_3}=cos\alpha \hat{e_1}+cos\beta \hat{e_2} + cos\gamma \hat{e_3}$.
And the difference between the relationship of $\hat{e_i}$ and $\tilde{e_i}$, ($i = 1,2,3$) is just the subindex. So we can quick derive the other two by substituting the subnumbers, and after careful deduction, we get above equation, and we can convince ourselves by checking the determinant of the roration matrix to be 1.
原文地址:https://www.cnblogs.com/raymondjiang/p/12394708.html