Skip to content

Commit 3adec8d

Browse files
committed
add more about homo coordinate
1 parent 6404615 commit 3adec8d

16 files changed

+37
-3
lines changed

GAMES101_Lecture_02.pdf

30.8 KB
Binary file not shown.

Notes11.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
用一系列控制点去定义曲线
1818

1919

20-
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/bezier.jpg)
20+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/bezier.png)
2121

2222
给定三个点: 生成二次贝塞尔曲线
2323

@@ -32,7 +32,7 @@ https://github.com/venshine/BezierMaker
3232

3333
对于4个控制点的情形:
3434

35-
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/bezier1.jpg)
35+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/bezier1.png)
3636

3737
从原来4个点 3条线段(b0b1 b1b2 b2b3)
3838

Notes3.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828

2929
## 齐次坐标
3030

31+
简而言之,齐次坐标就是用N+1维来代表N维坐标
32+
33+
PS: 齐次坐标可让包括无穷远点的点坐标以有限坐标表示
3134

3235
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/homo.jpg)
3336

@@ -40,6 +43,20 @@
4043

4144
PS 对于向量(x, y, z, w), 只要 w !=0 就认为所在三维坐标空间中的点是(x/w, y/w, z/w)
4245

46+
PS 关于齐次坐标向量和点的区别
47+
48+
在齐次坐标中, 对于点新增的维度值是 1. 而对于向量, 新增的维度值是0
49+
50+
为什么要这么设定呢?
51+
向量平移要满足不变性, 也就是说一个向量(x, y) 在平移后, 仍然是(x, y)
52+
53+
所以, 向量新增的维度应该是0
54+
55+
并且, 根据 point - point = vector 二维向量的新增的这个维度也恰好是0.
56+
57+
也就是说, 齐次坐标新增的这个维度, 不影响现有的向量计算.
58+
59+
4360
## 2D变换的总结
4461
“仿射变换”就是:“线性变换”+“平移”
4562

Notes4.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,26 @@ Projection is a Transformation. 投影是一种变换.
131131

132132
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/project6.jpg)
133133

134+
135+
最左侧的那个实心小点 代表相机的位置 Y 画出了相机的Up 方向. 从 Z 方向说明相机正向 -Z 方向看.
136+
134137
原本的 y 在挤压之后变为 y' 根据相似三角形就可以得到上面的结果
135138

136139

140+
PS: 我们只知道近平面和远平面 z 值不变, 中间z 是否变不确定.
141+
142+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/project8.jpg)
143+
144+
145+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/project9.jpg)
146+
147+
137148
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/project2.jpg)
138149

150+
151+
PS: 注意这里最后 (0,0, A, B)那一块是简写 只写了透视矩阵的第三行 最后n^2 也是说透视 矩阵✖️ (x, y, z, 1) 得到的第三行的值
152+
153+
139154
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/project3.jpg)
140155

141156
## Read More

Notes5.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ Part I Triangle
1313
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/screen.jpg)
1414

1515

16-
### Frustum 到 screen 的变换
16+
### 视口变换
17+
18+
Frustum 到 screen 的变换
1719
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/screen1.jpg)
1820

1921

images/.DS_Store

6 KB
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

images/project8.jpg

198 KB
Loading

images/project9.jpg

198 KB
Loading

0 commit comments

Comments
 (0)