旋转矩阵
01 旋转矩阵
- [ cos θ − sin θ sin θ cos θ ] \displaystyle{ \displaystyle{\left[\begin{array}{lll} \ \cos\theta & -\sin\theta\ \\ \ \sin\theta & \cos\theta\end{array}\right]} } [ cosθ sinθ−sinθ cosθ] .
02 如何记忆?
(1) 特殊情形
-
点 D D D 旋转 θ \theta θ 角度到点 E E E .
-
设 E ( u , v ) , D ( x , y ) E\ (u,v)\ ,\ D\ (x,y) E (u,v) , D (x,y) ,则 u / cos θ = x , v / sin θ = x u/\cos\theta = x\ ,\ v/\sin\theta = x u/cosθ=x , v/sinθ=x .
-
[ u v ] = [ cos θ ⋅ x sin θ ⋅ x ] = [ cos θ ? sin θ ? ] [ x 0 ] = [ cos θ − sin θ sin θ cos θ ] [ x y ] \displaystyle{ \displaystyle{\left[\begin{array}{lll} \ u\ \\ \ v \ \end{array}\right]=\left[\begin{array}{lll} \ \cos\theta\cdot x\ \\ \ \sin\theta\cdot x \ \end{array}\right]=\left[\begin{array}{lll} \ \cos\theta & ?\ \\ \ \sin\theta & ?\end{array}\right]}\left[\begin{array}{lll} \ x\ \\ \ 0 \ \end{array}\right]=\left[\begin{array}{lll} \ \cos\theta & -\sin\theta\ \\ \ \sin\theta & \cos\theta\end{array}\right]\left[\begin{array}{lll} \ x\ \\ \ y \ \end{array}\right] } [ u v ]=[ cosθ⋅x sinθ⋅x ]=[ cosθ sinθ? ?][ x 0 ]=[ cosθ sinθ−sinθ cosθ][ x y ] .
(2) 矩阵分析
-
[ cos θ ? sin θ ? ] \displaystyle{ \displaystyle{\left[\begin{array}{lll} \ \cos\theta & ?\ \\ \ \sin\theta & ?\end{array}\right]} } [ cosθ sinθ? ?] ,怎么记忆?
-
旋转矩阵的行列式 = 1 =\ 1 = 1,那么 cos \cos cos 的对角线就是 cos \cos cos ,
-
sin \sin sin 的对角线就是 sin \sin sin ,而且副对角线需要有一个带负号。
-
只有这样,行列式才会得到 cos 2 + sin 2 \cos^2+\sin^2 cos2+sin2 的形式。
(3) 极坐标记忆
- 极坐标变换中,有 x = r cos θ x=r\cos\theta x=rcosθ, y = r sin θ y=r\sin\theta y=rsinθ,
- 那么 x , y x,y x,y 对 r , θ r,\theta r,θ 的雅可比矩阵为:
- [ ∂ x ∂ r ∂ x ∂ θ ∂ y ∂ r ∂ y ∂ θ ] = [ cos θ − r sin θ sin θ r cos θ ] \displaystyle{ \displaystyle{\left[\begin{array}{lll} \ \displaystyle{\frac{\partial x}{\partial r}} & \displaystyle{\frac{\partial x}{\partial \theta}}\ \\ \ \displaystyle{\frac{\partial y}{\partial r}} & \displaystyle{\frac{\partial y}{\partial \theta}}\end{array}\right]}=\displaystyle{\left[\begin{array}{lll} \ \cos\theta & -r\sin\theta\ \\ \ \sin\theta & r\cos\theta\end{array}\right]} } ∂r∂x ∂r∂y∂θ∂x ∂θ∂y =[ cosθ sinθ−rsinθ rcosθ] ,
- 当 r = 1 r=1 r=1 时,即为旋转矩阵: [ cos θ − sin θ sin θ cos θ ] \displaystyle{ \displaystyle{\left[\begin{array}{lll} \ \cos\theta & -\sin\theta\ \\ \ \sin\theta & \cos\theta\end{array}\right]} } [ cosθ sinθ−sinθ cosθ] .