二维旋转矩阵推导:

A沿Y轴逆时针旋转\theta度后变为点{A}'

x={OA}cos\varphiy={OA}sin\varphi

{x}'= {OA}'cos(\varphi +\theta )={OA}'(cos\varphi cos\theta -sin\varphi sin\theta )=xcos\theta -ysin\theta

{y}'={OA}'sin(\varphi +\theta )={OA}'(sin\varphi cos\theta +cos\varphi sin\theta )=ycos\theta +xsin\theta

则旋转矩阵R\begin{bmatrix} cos\theta & -sin\theta \\ sin\theta & cos\theta \end{bmatrix}

顺时针旋转时R\begin{bmatrix} cos\theta & sin\theta \\ -sin\theta & cos\theta \end{bmatrix}

同理可得在三维坐标系(右手准则)下:

X轴逆时针旋转\theta角度旋转矩阵R_{x}为:\begin{bmatrix} 1 & 0 & 0\\ 0 & cos\theta & -sin\theta \\ 0 & sin\theta & cos\theta \end{bmatrix}X轴坐标不变,YZ平面旋转。

同理,绕Y轴逆时针旋转\theta角度旋转矩阵R_{y}为:\begin{bmatrix} cos\theta & 0 & sin\theta \\ 0 & 1 & 0 \\ -sin\theta & 0 & cos\theta \end{bmatrix}

Z轴逆时针旋转\theta角度旋转矩阵R_{z}为:\begin{bmatrix} cos\theta & -sin\theta & 0\\ sin\theta & cos\theta & 0\\ 0 & 0 & 1 \end{bmatrix}

则三维旋转矩阵为:R_{x}\cdot R_{y}\cdot R_{z}

 

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐