30.08.2014 Views

Past Midterm and Exam Questions (PDF) - Student.cs.uwaterloo.ca ...

Past Midterm and Exam Questions (PDF) - Student.cs.uwaterloo.ca ...

Past Midterm and Exam Questions (PDF) - Student.cs.uwaterloo.ca ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CS488/688 Introduction to Computer Graphi<strong>cs</strong> 15<br />

}<br />

albedo = dot ( normal_EC , light_EC ) ;<br />

gl_Position = ftransform( ) ;<br />

Write the code for the fragment shader that uses a bright red material if the albedo term is<br />

greater than 0.7 <strong>and</strong> a dark red material otherwise.<br />

Fragment shader note: the resulting colour should be stored in the variable gl FragColor.<br />

7.2 Shadow Maps [Last Used: Winter 2013 Final]<br />

Shadow maps are one method of generated shadows using OpenGL. Describe how to implement<br />

shadow maps.<br />

8 Hidden Surfaces<br />

8.1 Visible Surface Algorithms [Last Used: Winter 1998 <strong>Midterm</strong>]<br />

This question concerns the following algorithms which address the visible surface problem:<br />

1. The binary space partitioning algorithm (BSP)<br />

2. Warnock’s algorithm<br />

3. The Painter’s algorithm<br />

4. Backfacing polygon removal<br />

5. Z-buffering<br />

(a) Briefly describe the visible surface problem.<br />

(b) Give the number (or numbers) of the relevant algorithms for the following questions (if none<br />

of the algorithms have the sated property, write ’none’):<br />

Which algorithms<br />

A. involve area subdivision?<br />

B. require building a tree?<br />

C. often use extra memory hardware?<br />

D. require signifi<strong>ca</strong>nt preprocessing time?<br />

E. require knowing polygon orientations?<br />

F. involve comparing pixel depths?<br />

G. are device independent?<br />

H. are view-independent?<br />

I. <strong>ca</strong>n be easily implemented in hardware?<br />

J. which algorithm is clearly insufficient to solve the visible surface problem?

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!