W Randolph Franklin home page
... (old version)
ComputerGraphicsFall2011/ home page Login

ECSE-4750 Computer Graphics, Rensselaer Polytechnic Institute, Midterm Exam, Fall 2011, 13 Oct 2011 4-5:30


NAME: ____________________________________ EMAIL:___________________________ RIN:______________

Answer every question.There are 3 pages with 20 questions, total 40 points.

For 2 questions, you may write free for your answer (and get 2 points each).

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. _____/2 Suppose that you have 1000 triangles that can be arranged into a triangle strip. How many vertices would you have to specify to OpenGL if you use the fact that they can be arranged into a triangle strip?

  2. _____/2 What is the event loop?

  3. _____/2 What OpenGL routine do you call to tell it that you wish to have a depth buffer? (I am not asking how to enable the depth buffer.)

  4. _____/2 Name two ways that putting all your vertices into an array and telling OpenGL about it might make a big graphics program faster.

  5. _____/2 One problem with putting all your vertices into an array is that each vertex might be a member of a variable containing other info, such as this:
      Class Vert {
      float coords[3];
      float color[4];
      float normal[3];
      Vert verts[10];
    Therefore the coordinates of successive vertices are not adjacent. How can you tell OpenGL about that when using a vertex array?

  6. _____/2 What does glFlush do?

  7. _____/2 What is it about how display lists are constructed that prevents you from creating an infinite loop, where list 3 might call list 4 and list 4 calls list 3?

  8. _____/2 You can have the same callback routine for more than one menu. When that routine is called, how can it know which menu item in which menu was clicked on?

  9. _____/2 What does this do: glMatrixMode(GL_MODELVIEW);

  10. ____/2 Since routine specified in glutDisplayFunc takes no arguments, how do you get data from other routines to it?

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

  12. ____/2 When are glPushMatrix() and glPopMatrix() useful?

  13. ____/2 One property of a well designed font is that different characters may have different widths. E.g., m is wider than i. This could be a problem when writing a character string in OpenGL since you'd have to know the width of each character and advance the raster position the correct amount after drawing each character. However OpenGL makes things easy for you. How?

  14. ____/2 What would look different in the resulting image if you changed the 1.0 to -1.0 in the following line?
    gluLookAt(camera.getZoomDistance() * sin(camera.getViewDirection()*PI/180.0), 0.0, camera.getZoomDistance() * cos(camera.getViewDirection()*PI/180.0), 0.0, 0.0, 0.0, 0.0, 1.0 , 0.0);

  15. ____/2 Consider this sequence of calls:
    1. What color is the vertex (1,1,1)?
    2. What color is the vertex (2,2,2)?

  16. ____/2 Give the 4x4 matrix for a 90 degree rotation about the X axis followed by a translation by (1,2,3).

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

  18. ____/2 What's the 2 word name for the technique for storing the graphic objects in the GPU (if there's space) so that they does not have to be repeatedly sent down the network each time the window is redisplayed?

  19. ____/2 If you call glutCreateWindow a second time in the program, which one of the following happens?
    1. a new window replaces the old one
    2. a new window is created, and the old one still remains
    3. nothing happens
    4. an error message is printed and the program exits
    5. the computer executes the HCF (halt and catch fire) machine instruction.

  20. ____/2 Here's how picking might have been implemented: When you pick an object, the line number of the glBegin call to draw the closest object covering that pixel might be returned by the pick routine.
    Why would this idea be inadequate?

end of exam

Material created by W. Randolph Franklin and others is Copyright © 1994-2010, by the authors, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License · This wiki is pmwiki-2.2.138 Barthelme theme by Scott and ported by Chi Shang
This page is /pmwiki/pmwiki.php/ComputerGraphicsFall2011/MidtermF2011 · Last modified on October 17, 2011, at 11:10 AM · Now is , ,