旋转矩阵:点旋转和坐标系旋转

点旋转

在这里插入图片描述

点P在直角坐标系下的坐标为(x,y),表示成极坐标(r,α),则有关系式:
{ x = r ⋅ cos ⁡ α y = r ⋅ sin ⁡ α \left\{\begin{array}{l} x=r \cdot \cos \alpha \\ y=r \cdot \sin \alpha \end{array}\right. {x=rcosαy=rsinα
点P绕坐标系原点逆时针旋转θ角度,得点P’的坐标为(x’,y’),极坐标表示为(r,α+θ),则有关系式:
{ x ′ = r ⋅ cos ⁡ ( α + θ ) = r ⋅ cos ⁡ α ⋅ cos ⁡ θ − r ⋅ sin ⁡ α ⋅ sin ⁡ θ y ′ = r ⋅ sin ⁡ ( α + θ ) = r ⋅ sin ⁡ α ⋅ cos ⁡ θ + r ⋅ cos ⁡ α ⋅ sin ⁡ θ \left\{\begin{array}{l} x^{\prime}=r \cdot \cos (\alpha+\theta)=r \cdot \cos \alpha \cdot \cos \theta-r \cdot \sin \alpha \cdot \sin \theta \\ y^{\prime}=r \cdot \sin (\alpha+\theta)=r \cdot \sin \alpha \cdot \cos \theta+r \cdot \cos \alpha \cdot \sin \theta \end{array}\right. {x=rcos(α+θ)=rcosαcosθrsinαsinθy=rsin(α+θ)=rsinαcosθ+rcosαsinθ
化简可得:
{ x ′ = x ⋅ cos ⁡ θ − y ⋅ sin ⁡ θ y ′ = y ⋅ cos ⁡ θ + x ⋅ sin ⁡ θ \left\{\begin{array}{l} x^{\prime}=x \cdot \cos \theta-y \cdot \sin \theta \\ y^{\prime}=y \cdot \cos \theta+x \cdot \sin \theta \end{array}\right. {x=xcosθysinθy=ycosθ+xsinθ
写成矩阵的形式为:
[ x ′ y ′ ] = [ cos ⁡ θ − sin ⁡ θ sin ⁡ θ cos ⁡ θ ] [ x y ] \left[\begin{array}{l} x^{\prime} \\ y^{\prime} \end{array}\right]=\left[\begin{array}{cc} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{array}\right]\left[\begin{array}{l} x \\ y \end{array}\right] [xy]=[cosθsinθsinθcosθ][xy]
则点P到点P’的旋转矩阵可表示为:
R p o i n t = [ cos ⁡ θ − sin ⁡ θ sin ⁡ θ cos ⁡ θ ] R_{point} =\left[\begin{array}{cc} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{array}\right] Rpoint=[cosθsinθsinθcosθ]

坐标系旋转

在这里插入图片描述

点P在直角坐标系下的坐标为(x,y),表示成极坐标(r,α),则有关系式:
{ x = r ⋅ cos ⁡ α y = r ⋅ sin ⁡ α \left\{\begin{array}{l} x=r \cdot \cos \alpha \\ y=r \cdot \sin \alpha \end{array}\right. {x=rcosαy=rsinα
点P不动,坐标系绕原点逆时针旋转θ角度,坐标变为(x’,y’),极坐标为(r,α-θ),则有关系式:

{ x ′ = r ⋅ cos ⁡ ( α − θ ) = r ⋅ cos ⁡ α ⋅ cos ⁡ θ + r ⋅ sin ⁡ α ⋅ sin ⁡ θ y ′ = r ⋅ sin ⁡ ( α − θ ) = r ⋅ sin ⁡ α ⋅ cos ⁡ θ − r ⋅ cos ⁡ α ⋅ sin ⁡ θ \left\{\begin{array}{l} x^{\prime}=r \cdot \cos (\alpha-\theta)=r \cdot \cos \alpha \cdot \cos \theta+r \cdot \sin \alpha \cdot \sin \theta \\ y^{\prime}=r \cdot \sin (\alpha-\theta)=r \cdot \sin \alpha \cdot \cos \theta-r \cdot \cos \alpha \cdot \sin \theta \end{array}\right. {x=rcos(αθ)=rcosαcosθ+rsinαsinθy=rsin(αθ)=rsinαcosθrcosαsinθ
化简可得:
{ x ′ = x ⋅ cos ⁡ θ + y ⋅ sin ⁡ θ y ′ = y ⋅ cos ⁡ θ − x ⋅ sin ⁡ θ \left\{\begin{array}{l} x^{\prime}=x \cdot \cos \theta+y \cdot \sin \theta \\ y^{\prime}=y \cdot \cos \theta-x \cdot \sin \theta \end{array}\right. {x=xcosθ+ysinθy=ycosθxsinθ
写成矩阵的形式为:
[ x ′ y ′ ] = [ cos ⁡ θ sin ⁡ θ − sin ⁡ θ cos ⁡ θ ] [ x y ] \left[\begin{array}{l} x^{\prime} \\ y^{\prime} \end{array}\right]=\left[\begin{array}{cc} \cos \theta & \sin \theta \\ -\sin \theta & \cos \theta \end{array}\right]\left[\begin{array}{l} x \\ y \end{array}\right] [xy]=[cosθsinθsinθcosθ][xy]
则坐标系OXY旋转到坐标系O’X’Y’的旋转矩阵可表示为:
R c o o r d i n a t e = [ cos ⁡ θ sin ⁡ θ − sin ⁡ θ cos ⁡ θ ] R_{coordinate} =\left[\begin{array}{cc} \cos \theta & \sin \theta \\ -\sin \theta & \cos \theta \end{array}\right] Rcoordinate=[cosθsinθsinθcosθ]

总结

  1. 点旋转:在坐标系OXY中,存在点P,点P经过旋转到点P’,旋转矩阵为 R p o i n t R_{point} Rpoint,则 P ’ = R p o i n t ∗ P P’=R_{point}*{P} P=RpointP

  2. 坐标系旋转:在坐标系OXY中,存在点P,坐标系OXY经过旋转变为坐标系O’X’Y’,则点P的坐标改变为P’,旋转矩阵为 R c o o r d i n a t e R_{coordinate} Rcoordinate,则 P ’ = R c o o r d i n a t e ∗ P P’=R_{coordinate}*{P} P=RcoordinateP

当点旋转和坐标系旋转的旋转角度和旋转方向一样时,可以发现 R p o i n t R_{point} Rpoint R c o o r d i n a t e R_{coordinate} Rcoordinate是互逆关系,即 R p o i n t = R c o o r d i n a t e t R_{point}=R^{t}_{coordinate} Rpoint=Rcoordinatet

  • 30
    点赞
  • 39
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值