Lab 6: 3D Viewing Pipeline

Alex Benn and Andrew Frampton

Quick Summary

This code implements the perspective projection process. This is a multi-step process whereby the elements to be drawn are first translated, rotated, and scaled into a unit volume near the origin, then clipped according to their location relative to that unit volume. Finally, the x- and y-coordinates are multiplied by the inverse of their distance in the z-direction from the origin, so that further-away objects are scaled to be smaller than closer objects.


Figure 1: Required Cube Image


Figure 2: Perspective Cube Image

Questions

  1. Eight points:
  2. When the distance between the COP and VRP is modified, the view of the object world zooms in more tightly or widens the view. This is similar to adjusting the zoom on a camera.
  3. When the VUP is modified, the angle of rotation of the view frame changes.
  4. There are two sets of parameters that affect the window size. The first set is du and dv, which affect how much things are scaled in the final picture. The second set is screenx and screeny, which specify the number of pixels in the image. If these are changed, the objects themselves take up no more or fewer pixels on-screen, but will reside in a larger or smaller image.
  5. No extensions were completed... yet.

Back to Alex and Andrew's other labs