Why do we want to consider unit cube, instead of a 2D screen?
@doodooloo Take a look at the Wikipedia article on the viewing frustum. As discussed in class today, one particularly important reason for having near and far clip planes is that the range of values you can store in the depth buffer is bounded. So, you want to make good use of this range of values by squeezing the frustum around the closest and furthest object in your scene.
@doodooloo. Another important function of the near clipping plane is to avoid drawing primitives that lie at Z=0 (and thus w=0 after perspective projection.) Why might it be a good idea to do this? Hint: consider the behavior of the perspective projection transform (and the subsequent conversion from homogeneous coordinates) as well as the math of perspective correct attribute interpolation.
Can anyone explain how P is derived? Thanks
@pavelkang I believe you decide what coordinates you want for the 8 vertices of your frustum, and then you find the matrix values for P that will map each vertex to its corresponding vertex in the unit cube, when you multiply that vertex (a vector) by the matrix P. Finding P is then just solving this linear system of equations.