Projection in Computer Graphics

Perspective projection vs. orthographic projection

Orthographic Projection 正交投影

方法一

A simple way of understanding

<aside> 💡 将坐标中的 z 扔掉,如何区分物体的前和后?

</aside>

感兴趣可以参考 Catlikecoding Render 1 中 Orthographic Camera 部分。

方法二

In general, we want to map a cuboid [l, r] x [b, t] x [f, n] to the “canonical (正则、规范、标准)” cube $[-1,1]^{3}$

我们在 $x$ 轴上定义左和右 $[l, r]$ (左比右小),$y$ 轴上定义下和上 $[b, t]$(下比上小),$z$ 轴上定义远和近 $[f, n]$(远比近小)。