记向量\(OP\)与\(X\)轴正方向夹角为 \(\alpha\) ,长为 $ R $ ,则$x = Rcos{\alpha} ,\quad y = Rsin{\alpha} $ ,顺时针或者逆时针旋转\(\theta\)后变为$ OP' $ ,其长度不变。
一、顺时针
如果按顺时针旋转,\(OP'\)坐标为:
$x' = Rcos{(\alpha - \theta)} ,\quad y' = Rsin{(\alpha - \theta)} $,由三角和差公式可得:
\(x' = R(cos{\alpha}cos\theta + sin\alpha sin\theta) = Rcos\alpha cos\theta + Rsin\alpha sin\theta = xcos\theta + ysin\theta\)
\(y' = R(sin{\alpha}cos\theta - cos\alpha sin\theta) = Rsin\alpha cos\theta - Rcos\alpha sin\theta = - xsin\theta + ycos\theta\)
即:
\[\begin{bmatrix} x' \\ y' \\ \end{bmatrix} = \begin{bmatrix} cos\theta & sin\theta \\ -sin\theta & cos\theta \\ \end{bmatrix} \begin{bmatrix} x \\ y \\ \end{bmatrix} \]所以平面向量顺时针旋转\(\theta\)后其旋转矩阵为:
\[T = \begin{bmatrix} cos\theta & sin\theta \\ -sin\theta & cos\theta \\ \end{bmatrix} \]二、逆时针
如果按照逆时针旋转,\(OP'\)坐标为:
$x' = Rcos{(\alpha + \theta)} ,\quad y' = Rsin{(\alpha + \theta)} $,由三角和差公式可得:
\(x' = R(cos{\alpha}cos\theta - sin\alpha sin\theta) = Rcos\alpha cos\theta - Rsin\alpha sin\theta = xcos\theta - ysin\theta\)
\(y' = R(sin{\alpha}cos\theta + cos\alpha sin\theta) = Rsin\alpha cos\theta + Rcos\alpha sin\theta = xsin\theta + ycos\theta\)
即:
\[\begin{bmatrix} x' \\ y' \\ \end{bmatrix} = \begin{bmatrix} cos\theta & -sin\theta \\ sin\theta & cos\theta \\ \end{bmatrix} \begin{bmatrix} x \\ y \\ \end{bmatrix} \]所以平面向量逆时针旋转\(\theta\)后其旋转矩阵为:
\[T = \begin{bmatrix} cos\theta & -sin\theta \\ sin\theta & cos\theta \\ \end{bmatrix} \] 标签:cos,end,theta,旋转,bmatrix,alpha,平面,sin,向量 From: https://www.cnblogs.com/xiaxuexiaoab/p/17032725.html