Previous | Next --- Slide 17 of 66
Back to Lecture Thumbnails
Misaka-10032

Does this step maps

  • $(x, y, -zNear, zNear)$ to $(\frac{x}{w/2}, \frac{y}{h/2}, -zNear, zNear)$
  • $(x, y, zFar, zFar)$ to $(\frac{x}{w/2}, \frac{y}{h/2}, zFar, zFar)$

? If that is the case, I think $f=\cot\frac{\theta}{2}$? because $\frac{h}{2}=\tan\frac{\theta}{2}$?

scoros

That's right. As you change the field of view and aspect ratio parameters, the values of $w$ and $h$ will change. In this example, $h/2$ is the y-value that all points on the top plane of the frustum will map to. Similarly, $-h/2$ is the value that all points on the bottom plane of the view frustum will map to. And so it goes for +/i$w/2$ and the side planes of the frustum. After the transform, the corners of the view frustum will be mapped to the corners of the unit cube.