NAME: ____________________________________

   EMAIL:______________________ RIN:______________


Rensselaer Polytechnic Institute, Troy NY USA
ECSE-4750 Computer Graphics Fall 2008
Midterm Exam, 8 Oct 2008 4-5:30

Answer every question.There are 28 questions.

This exam is open book: you may use calculators and any paper books and notes that you brought with you. You may not use computers or communication devices, or share material with other students.

1. _____/(1 point) What do the contrasting stories of the Brooklyn Bridge and the Quebec Bridge teach us?

2. _____/2 Processing objects 1-by-1 with a graphics pipeline has a major advantage and also a major disadvantage. Name them.

3. _____/1 Why must you remove objects that are outside the view volume?

4. _____/2 Does a straightline always remain straight after perspective projection? Give a reason; not just yes/no. (This is hard.)

5. _____/1 Why do we want to make projection into a matrix multiplication?

6. _____/1 Why does OpenGL contain primitives, like triangle fans, that are not necessary (since you could draw the triangles separately)?

7. _____/1 Why do we consider color to have three dimensions, such as RGB? There are an infinite number of visible wavelengths.

8. _____/1 What is the event loop?

9. _____/1 What does this do:
glutDisplayFunc(display)

10. _____/1 If you don't want to use the entire window for your image, what subroutine do you call?

11. _____/1 What does this do:
glMatrixMode(GL_PROJECTION);

12. ____/1 Since the mydisplay routine takes no arguments, how do you get data from the main program to it?

13. ____/1 What rendering technique handles reflections and refractions well?

14. _____/2 Use the vector formulation or your intuition to rotate the point (0,1,0) by 60 degrees about the axis (0,1,0).

15. _____/1 What's a disadvantage of standards?

16. _____/1 What is an OpenGL fragment?

17. _____/1 By now most of you know the advantage of using XOR to write a cursor into the color buffer. So, why don't graphics systems do this all the time? E.g., the system I'm now using doesn't.

18. ____/1 What's the normal to the plane 5x+2y+3z=1? Your answer should be normalized.

19. ____/2 Give 4 advantages of homogeneous coordinates.

20. ____/1 How is the Z buffer used to make closer objects display in front of farther ones?

21. ____/2 Consider this sequence of calls:
glColor3f(1.,1.,1.);
glColor3f(0.,1.,0.);
glVertex3f(1.,1.,1.);
glVertex3f(2.,2.,2.);

1. What color is the vertex (1,1,1)?
2. What color is the vertex (2,2,2)?

22. ____/1 What's the point of using two color buffers, one to draw into, while the other is being displayed?

23. ____/1 Why are three color buffers even better?

24. ____/2 Give the 4x4 homogeneous matrix for a 60 degree rotation about the Y axis.

25. ____/2 To deal with multiple functions for a similar purpose, C++ and OpenGL take different approaches: C++ use overloading while OpenGL defined a number of functions which differ from each other in the last letter, for example, glVertex3f, glVertex2i, glVertex3dv all create vertex but the first take different data types as input. What is an advantage of each approach?

26. ____/2 How does the following code guarantee the correctness of the resize process?
  void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION); /* switch matrix mode */
if (w <= h)
gluOrtho2D(-2.0, 2.0, -2.0 * (GLfloat) h / (GLfloat) w,
2.0 * (GLfloat) h / (GLfloat) w);
else  gluOrtho2D(-2.0 * (GLfloat) w / (GLfloat) h, 2.0 *
(GLfloat) w / (GLfloat) h, -2.0, 2.0);
}


27. ____/1 Since the Z buffer looks so useful, why is it not enabled by default?

28. ____/1 Why do we like to group different physical input devices into the same logical input device?

End. Total: 36 points