Fall 99 Midterm

1: Polygon Filling (75 points)

Show the contents of the ET, AET, along with the events that change them while filling the following polygon: (10,10), (100,55), (100,120), (50,70), (10,100) where an edge connects each point to the next and the last back to the first.

2: Polygon Clipping (75 points)

Show the steps in applying the Sutherland-Hodgman Polygon clipping algorithm to the following polgon: .(-20,-30), (-20, 30), (20, 30), (20, 50), (10,50), (10,120), (120, 120), (120, 80), (70, 80), (70, 30), (110, 30), (110, -30) where an edge connects each point to the next and the last back to the first. The clip rectangle stretches from x=0 to x=100, y=-10 to y=100, and the clipping should use the planes in the following order: Xmax, Xmin, Ymax, Ymin. You should use 1 (or preferably more) diagrams to show the state of the clipping after each pass, and label each of the new points

3: Transformations (75 points)

Say you have three polygonal drawing functions available to you:
void DrawSquare(void) //Draw a square centered at the origin with sides of length 1
void DrawCircle(void) //Draw a circle centered at the origin with diameter of length 1
void DrawTriangle(void) //Draw a triangle with the three corners (-1,0), (1,0), (0,1)

and two transformation functions Scale(X,Y) and Translate(X,Y) where scaling and rotation are performed about the origin as we discussed in class:

and LoadIdentity(), PushMatrix(), and PopMatrix() as described in class:

Give the sequence of those function calls to draw the following scene. Please comment your code so I know what you are trying to draw with each block of code.

4: 3D Graphics (75 points)

Assume you have the following two polygons defined by their coordinates in X,Y,Z:
Polygon 1: (10,0,0), (30,0,0), (30,10,0), (10,10,0)
Polygon 2: (30,0,0), (30,10,0), (30,0,10)

For each of the following conditions draw and label a diagram showing the 2 sets of axis, the polygons, the PRP, and the window. Also in a second drawing, show what will appear in the window.

VRP 30,0,0
VPN 1,0,0
VUP 0,1,0
PRP 0,0,20
U-25 to 25
V 25 to 25
VRP 30,0,0
VPN 0,0,1
VUP 0,1,0
PRP 0,0,20
U-25 to 25
V 25 to 25
VRP 30,0,0
VPN 0,1,0
VUP 1,0,0
PRP 0,0,20
U-25 to 25
V 25 to 25

Fall 99 Final Exam

1: Warnock's Algorithm (75 points)

Use Warnock's Algorithm to assign values to the following diagram where you should assume the triangle is in front of the rectangle. Recurse as far as necessary drawing in the divisions you are creating and ensuring each box you create is labeled in one of five ways.

  1. all disjoint
  2. single contained or intersecting
  3. single surrounding
  4. front surrounding
  5. needs further subdivision beyond the resolution of this diagram

2: 2D Cues to Depth (75 points)

a. Using examples from real life, i.e. by describing an image you may see in a photograph, explain how each of the eight 2D cues to depth work:

  1. Overlap
  2. Apparent Size
  3. Differential Size
  4. Linear Perspective
  5. Motion Parallax
  6. Aerial Perspective
  7. Texture
  8. Shading and Lighting

b. Explain WHY the dominant cue within 12" is stereo vision that is, explain why EACH of the other cues less effective.

3: Lighting (75 points)

  1. Explain the differences between the following: no lighting model, diffuse reflection, specular reflection. Then give 2 example objects that would look most appropriate for each type of lighting model.
  2. Explain the differences between the following types of shading in terms of both their overall effect and the way that they are implemented: none, flat, Goraud, Phong
  3. Explain the differences between ray-tracing and radiosity

4: OpenGL (75 points)

In the 4th assignment you wrote an OpenGL program allowing you to drive/fly through a computer graphics small town. In this question you are to write a complete C/C++ OpenGL program to open a window to give us a perspective view (you can use the AUX routines here), draw a green plane to be the ground and then draw three white buildings on the ground in the shape of 488. Everything (the buildings and the plane) should be drawn using only cubes, and the various OpenGL transforms.