CompSci 344
Spring 2015
Computer Graphics

Graphics Pipeline Homework

Create a folder within your homework project on GitHub named 03_pipeline. Your submission must

You may use any medium with which you feel comfortable to complete your work. In the past, people have written programs, used applications such as Mathematica or Matlab, or formatters such Microsoft Word or LaTEX, or even written it out long hand and taken pictures of it. However, you should submit only code, plain text, HTML, or PDF, and possibly image (gif, jpeg, or png) files. You are responsible for converting it into one of those standard formats (most current programs can save or print files to a variety of alternate formats).

Whatever means you use to derive answers to the questions below, your submitted work must show all yours steps to getting to the answer, not simply the final result.

Problems

  1. Given the OpenGL program cube (also available via GitHub), show how the graphics pipeline maps the unit cube, centered at the origin, to the displayed 2D picture.

    After each OpenGL call below (the first step is in the framework code and the last step is in the Printer class), its result is shown.

    Derive the values printed by the program for the ModelView or Projection matrices as well as the first of the screen coordinates given for the cube. Please use the printed values given by running the program on my computer (i.e., on a hi-resolution screen with a Viewport size of 1200x1200) rather than on the values generated on your computer, so the values are consistent for everyone.

  2.  

  3. Given this unedited photograph of two normal-sized people that is 450 pixels high. The two heads shown measure 90 and 15 pixels high. Assume all heads are 30cm high. The image on the camera’s film plane is 24mm high.
    1. If you know that the person in the foreground is 2 meters from the camera, what is the camera’s image plane distance (roughly, the focal length) and how far away is the other person?
    2. If you know that the two people are standing 20 meters apart, what is the image plane distance and how far from the camera is the closer person?
  4.