Homework 3

22C:151 Introduction to Computer Graphics

PART I due Thursday, September 25, 2003
PART II (the full program) due Thursday, October 2, 2003

35 points

PART I REQUIREMENTS: (1) do questions 1 and 2, and (2) get the viewing control part of the programming assignment working properly. You don't have to draw any objects (but you can if you want). I only require that you draw the global coordinate frame and have your viewing control commands working. I.e. I should be able to swing, elevate, and zoom the camera to look at the global coordinate frame from different places.
  1. An object is to be translated 7 units in direction (0,0,1) and then rotated by 60 degrees about the (global/world) X axis. Show the 4-by-4 transformation matrix that can be used to accomplish this.

  2. Assume an object is defined with a local coordinate frame that initially coincides with the global coordinate frame. The object is to be rotated 30 degrees about Y axis, and then translated (-5, 0, 0) in the direction of the object's local X axis.
    a.
    Show the 4-by-4 transformation matrix that can be used to accomplish this.
    b.
    Show a two-line OpenGL sequence that produces the matrix using a glRotate followed by a glTranslate.
    c.
    Show a two-line OpenGL sequence that produces the matrix using a glTranslate followed by a glRotate.



Write an OpenGL program that allows interactive creation and movement of lighted shaded objects, camera movement, and both orthographic and perspective viewing projections.

As before, I won't give a detailed specification of the program, but it must satisfy several requirements:


Submitting your program

Submit your assignment according to the guidelines on the class WWW home page. For the on-line part of the submission, respond 'hw3part1' or 'hw3part2' to the ``Location:'' request.