向量的旋转矩阵

我们都知道,矩阵的乘法可以表示旋转。那么,这一理论的数学机理是什么呢?以及,这个旋转角度该怎么用矩阵表示呢?

本文用二维向量旋转来推导旋转矩阵的公式。假设,我们有一个向量P(x, y),准备通过一个旋转矩阵将其旋转到Q(x’, y’),假设旋转角度为 α \alpha α

我们用极坐标表示向量P和向量Q,默认原点是向量的起点, θ \theta θ ϕ \phi ϕ分别表示P和Q与x轴正向的夹角。那么有,
x = r ∗ c o s ( θ ) (1) x=r*cos(\theta)\tag{1} x=rcos(θ)(1)
y = r ∗ s i n ( θ ) (2) y=r*sin(\theta)\tag{2} y=rsin(θ)(2)
x ′ = r ∗ c o s ( ϕ ) = r ∗ c o s ( α − θ ) (3) x'=r*cos(\phi)=r*cos(\alpha-\theta)\tag{3} x=rcos(ϕ)=rcos(αθ)(3)
y ′ = r ∗ s i n ( ϕ ) = r ∗ s i n ( α − θ ) (4) y'=r*sin(\phi)=r*sin(\alpha-\theta)\tag{4} y=rsin(ϕ)=rsin(αθ)(4)
咱们用一张图可以清晰解释上面5个公式:
极坐标
我们直接把式(3)、(4)展开:
x ′ = r ∗ c o s ( θ ) c o s ( α ) + r ∗ s i n ( θ ) s i n ( α ) = x c o s ( α ) + y s i n ( α ) (5) x'=r*cos(\theta)cos(\alpha)+r*sin(\theta)sin(\alpha)=xcos(\alpha)+ysin(\alpha)\tag{5} x=rcos(θ)cos(α)+rsin(θ)sin(α)=xcos(α)+ysin(α)(5)
y ′ = r ∗ s i n ( α ) c o s ( θ ) − r ∗ s i n ( θ ) c o s ( α ) = x s i n ( α ) − y c o s ( α ) (6) y'=r*sin(\alpha)cos(\theta)-r*sin(\theta)cos(\alpha)=xsin(\alpha)-ycos(\alpha)\tag{6} y=rsin(α)cos(θ)rsin(θ)cos(α)=xsin(α)ycos(α)(6)
整理(5)(6)得知:
R = [ c o s ( α ) − s i n ( α ) s i n ( α ) c o s ( α ) ] R= \begin{bmatrix} {cos(\alpha)}&{-sin(\alpha)}\\ {sin(\alpha)}&{cos(\alpha)} \end{bmatrix} R=[cos(α)sin(α)sin(α)cos(α)]

相关推荐

  1. 标量、矩阵和张区别?

    2024-05-02 09:00:02       79 阅读
  2. 矩阵、数组、向量空间

    2024-05-02 09:00:02       63 阅读
  3. 二维旋转平移矩阵

    2024-05-02 09:00:02       39 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-02 09:00:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-02 09:00:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-05-02 09:00:02       87 阅读
  4. Python语言-面向对象

    2024-05-02 09:00:02       96 阅读

热门阅读

  1. golang netpoller揭秘

    2024-05-02 09:00:02       22 阅读
  2. 经济效益分析:等保测评的成本与回报

    2024-05-02 09:00:02       27 阅读
  3. Web3应用:DeFi是什么?有什么用?

    2024-05-02 09:00:02       33 阅读
  4. 【JDBC】Apache DbUtils工具类使用

    2024-05-02 09:00:02       32 阅读
  5. ExcelUtil的导入导出

    2024-05-02 09:00:02       34 阅读
  6. XML:简介

    2024-05-02 09:00:02       36 阅读
  7. 数据库(MySQL)基础:函数

    2024-05-02 09:00:02       24 阅读
  8. Acwing 35. 反转链表

    2024-05-02 09:00:02       33 阅读