Docsity

Computer Graphics Fall 2009 Exam, Exams of Computer Graphics

Toggle sidebar
bg1
Computer Graphics Fall 2009 (this
group) home
Click to expand:
±WRF home page
±Teaching
±Research
±Miscellany
±Your wiki groups
SEARCH
Find
NAME: ______WRF______________________________
EMAIL:__________________ RIN:______________
7 Oct 2009 4-5:30
Answer every question.There are 7 pages with 15 questions, total
22 points.
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 Processing objects 1-by-1 with a graphics pipeline has a major advantage and also a
major disadvantage. Name them.
It's fast since several objects can be processed simultaneously at different stages of the
pipeline. However, the objects cannot interact with each other (except via the Z-buffer).
2. _____/1 Why must you remove objects that are outside the view volume?
If they are behind the camera, they will still project onto the projection (viewing) plane and
interfere with the visible objects.
3. _____/1 Suppose that you have 100 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?
102 (3 for 1st triangle, 1 each for the others).
4. _____/1 Why do we consider color to have three dimensions, such as RGB? There are an
infinite number of visible wavelengths.
The human eye can see 3 primary colors; it has 3 types of color receptors.
5. _____/1 What is the event loop?
The final thing your OpenGL program starts executing, which waits for a event, processes its
callback, then goes back to waiting.
Midterm Solution (Computer Graphics Fall 2009) http://www.ecse.rpi.edu/Homepages/wrf/pmwiki/ComputerGraphicsFall...
1 of 4 4/24/2011 11:26 A
M
pf3
pf4

Partial preview of the text

Download Computer Graphics Fall 2009 Exam and more Exams Computer Graphics in PDF only on Docsity!

Computer Graphics Fall 2009 (this group) home Click to expand: ±WRF home page ±Teaching ±Research ±Miscellany ±Your wiki groups SEARCH

Find

NAME: ______WRF______________________________

EMAIL:__________________ RIN:______________

7 Oct 2009 4-5:

Answer every question.There are 7 pages with 15 questions, total

22 points.

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 Processing objects 1-by-1 with a graphics pipeline has a major advantage and also a major disadvantage. Name them.

It's fast since several objects can be processed simultaneously at different stages of the pipeline. However, the objects cannot interact with each other (except via the Z-buffer).

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

If they are behind the camera, they will still project onto the projection (viewing) plane and interfere with the visible objects.

  1. _____/1 Suppose that you have 100 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?

102 (3 for 1st triangle, 1 each for the others).

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

The human eye can see 3 primary colors; it has 3 types of color receptors.

  1. _____/1 What is the event loop?

The final thing your OpenGL program starts executing, which waits for a event, processes its callback, then goes back to waiting.

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

raytracing

  1. _____/1 What is the OpenGL name for a potential pixel?

fragment.

  1. ____/2 What feature in OpenGL is used to display the closest object when several objects

overlap the same pixel?

Z-buffer, aka depth buffer.

  1. ____/2 Consider this sequence of calls:

glColor4f(1.,1.,0.,1.); glColor4f(0.,1.,0.,.0); glVertex2f(1., 1.); glVertex2f(1., 2.);

Assuming that all the relevant OpenGL options have been enabled, what colors are the 2 vertices?

The 2nd glColor4f call supercedes the first. That sets the drawing color to be transparent. Therefore the background color will show through. If that hasn't been changed, it will be black.

  1. ____/2 Which one of the following code fragments would you be more likely to see? Why? Could the other one still be legal and generate a useful picture? Why? a. this? glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(2.0, 8.0, 0.0, 8.0, -0.5, 2.5); b. or this? glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glOrtho(0.0, 8.0, 0.0, 8.0, -0.5, 2.5);

glOrtho is typically used to set the projection, and so the 1st code example is more common. However, the 2nd fragment would also produce a legal but different result, because glOrtho will just modify the ModelView matrix here.

why does only pointstep have an ampersand before it?

It's a scalar, the other an array. Both are returning values. That's the C semantics for returning values into a scalar and an array.