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 point) What do the contrasting stories of the Brooklyn Bridge
and the Quebec Bridge teach us?
- _____/2 Processing objects 1-by-1 with a graphics pipeline has a
major advantage and also a major disadvantage. Name them.
- _____/1 Why must you remove objects that are outside the
view volume?
- _____/2 Does a straightline always remain straight after perspective
projection? Give a reason; not just yes/no. (This is hard.)
- _____/1 Why do we want to make projection into a matrix multiplication?
- _____/1 Why does OpenGL contain primitives, like triangle fans,
that are not necessary (since you could draw the triangles
separately)?
- _____/1 Why do we consider color to have three dimensions, such
as RGB? There are an infinite number of visible wavelengths.
- _____/1 What is the event loop?
- _____/1 What does this do:
glutDisplayFunc(display)
- _____/1 If you don't want to use the entire window for your
image, what subroutine do you call?
- _____/1 What does this do:
glMatrixMode(GL_PROJECTION);
- ____/1 Since the mydisplay routine takes no arguments, how do you
get data from the main program to it?
- ____/1 What rendering technique handles reflections and
refractions well?
- _____/2 Use the vector formulation or your intuition to
rotate the point (0,1,0) by
60 degrees about the axis (0,1,0).
- _____/1 What's a disadvantage of standards?
- _____/1 What is an OpenGL fragment?
- _____/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.
- ____/1 What's the normal to the plane 5x+2y+3z=1? Your answer
should be normalized.
- ____/2 Give 4 advantages of homogeneous coordinates.
- ____/1 How is the Z buffer used to make closer objects display in front of farther ones?
- ____/2 Consider this sequence of calls:
glColor3f(1.,1.,1.);
glColor3f(0.,1.,0.);
glVertex3f(1.,1.,1.);
glVertex3f(2.,2.,2.);
- What color is the vertex (1,1,1)?
- What color is the vertex (2,2,2)?
- ____/1 What's the point of using two color buffers, one to draw into, while the other is being displayed?
- ____/1 Why are three color buffers even better?
- ____/2 Give the 4x4 homogeneous matrix for a 60 degree
rotation about the Y axis.
- ____/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?
- ____/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 */ glLoadIdentity(); 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); glMatrixMode(GL_MODELVIEW); /* return to modelview mode */ }
- ____/1 Since the Z buffer looks so useful, why is it not enabled by default?
- ____/1 Why do we like to group different physical input
devices into the same logical input device?
End. Total: 36 points