点旋转
点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=r⋅cosαy=r⋅sinα
点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′=r⋅cos(α+θ)=r⋅cosα⋅cosθ−r⋅sinα⋅sinθy′=r⋅sin(α+θ)=r⋅sinα⋅cosθ+r⋅cosα⋅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′=x⋅cosθ−y⋅sinθy′=y⋅cosθ+x⋅sinθ
写成矩阵的形式为:
[
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]
[x′y′]=[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=r⋅cosαy=r⋅sinα
点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′=r⋅cos(α−θ)=r⋅cosα⋅cosθ+r⋅sinα⋅sinθy′=r⋅sin(α−θ)=r⋅sinα⋅cosθ−r⋅cosα⋅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′=x⋅cosθ+y⋅sinθy′=y⋅cosθ−x⋅sinθ
写成矩阵的形式为:
[
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]
[x′y′]=[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θ]
总结
-
点旋转:在坐标系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’=Rpoint∗P;
-
坐标系旋转:在坐标系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’=Rcoordinate∗P;
当点旋转和坐标系旋转的旋转角度和旋转方向一样时,可以发现 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。