内容先导

3维空间中的变换基本上可以理解为,2维空间中变换的延申,规律大致相同。

- 3D变换

- View transformation(观测变换)

  1. View / Camera transformation (视角变换)
  2. Projection transformation (投影变换)
    - Orthographic projection (正交变换)
    - Perspective projection (透视变换)

正文

1. 3D变换

1.齐次变换对应的矩阵
缩放:
【GAMES101 课程小结】:Lecture 04 三维空间中的坐标变换
位移:
【GAMES101 课程小结】:Lecture 04 三维空间中的坐标变换
旋转:
【GAMES101 课程小结】:Lecture 04 三维空间中的坐标变换

Rodrigues’ Rotation Formula (旋转公式)
【GAMES101 课程小结】:Lecture 04 三维空间中的坐标变换
令一个物体绕任意过原点的轴旋转一个角度。

2. 观测变换

1. View / Camera transformation (视角变换)

【GAMES101 课程小结】:Lecture 04 三维空间中的坐标变换
【GAMES101 课程小结】:Lecture 04 三维空间中的坐标变换

2. Projection transformation (投影变换)

2.1 Orthographic projection (正交变换)
中学所学的物体三视图,就是对物体做正交变换下的视图。

正交变换做了这样一件事情
【GAMES101 课程小结】:Lecture 04 三维空间中的坐标变换
1. 将一个范围在 [l, r] × [b, t] × [f, n] 的物体规范化到 [-1, 1] × [-1, 1] × [-1, 1]上。
其中
[l, r] 表示左右
[b, t] 表示下上
[f, n] 表示远近

矩阵表示:
【GAMES101 课程小结】:Lecture 04 三维空间中的坐标变换

2.2 Perspective projection (透视投影)
更接近于我们生活中的视图,具有近大远小的性质。
【GAMES101 课程小结】:Lecture 04 三维空间中的坐标变换
矩阵表示:
【GAMES101 课程小结】:Lecture 04 三维空间中的坐标变换
而后再做一次正交投影,得到透视投影的结果:
【GAMES101 课程小结】:Lecture 04 三维空间中的坐标变换

相关文章:

  • 2021-11-03
  • 2021-07-21
  • 2021-09-03
  • 2022-12-23
  • 2021-07-08
  • 2022-01-17
  • 2022-12-23
猜你喜欢
  • 2021-06-16
  • 2021-12-25
  • 2021-06-14
  • 2021-06-14
  • 2022-01-27
  • 2021-10-19
  • 2021-08-10
相关资源
相似解决方案