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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

15.13 Lighting [Last Used: Spring 2000 Final]<br />

Given a point for shading on a surface, we usually consider a normal vector ⃗n, a vector to the light<br />

source ⃗ l, a vector to the viewer ⃗v, <strong>and</strong> a reflection direction ⃗r (all vectors are of unit length). One<br />

possible version of the illumination equation is<br />

I out (⃗v) = k a I a + ∑ i<br />

(<br />

k d + k s<br />

P (⃗r, ⃗v)<br />

⃗n · ⃗l<br />

) ⃗ l · ⃗n<br />

I0<br />

i c 1 + c 2 d i + c 3 d 2 i<br />

a) Give an equation for the reflection direction vector ⃗r in terms of vectors ⃗ l <strong>and</strong> ⃗n.<br />

b) Define the Phong shading term P (⃗r, ⃗v) in terms of ⃗r, ⃗v, <strong>and</strong> a parameter p. For wider highlights<br />

on the surfaces is p increased or decreased?<br />

c) What is the term k a I a ? How does increasing I a affect the rendering of objects in the scene?<br />

d) What is the term c 1 + c 2 d i + c 3 d 2 i ? How is d i <strong>ca</strong>lculated? Suggest values for c 1 , c 2 , c 3 that<br />

would give harsh point lighting, as in outer space?<br />

e) This equation doesn’t mention R, G, or B, <strong>and</strong> yet we use it to render coloured objects. How<br />

do we adapt the equation to h<strong>and</strong>le RGB?<br />

15.14 Flat, Gouraud, <strong>and</strong> Phong Gouraud Shading [Last Used: Winter 2013<br />

Final]<br />

Suppose we are working in 2D <strong>and</strong> shading lines. Consider the following line segment (the thick<br />

line) with normals at its vertices, <strong>and</strong> a point light source:<br />

n 0 n 1<br />

V 0 V 1<br />

Describe how the line segment will look when shaded with the following three shading models,<br />

noting in particular where the brightest point on the line segment V 0 V 1 will occur. Assume that<br />

the line segment has only diffuse reflection components, that there is no ambient lighting, <strong>and</strong> that<br />

all lighting is gray s<strong>ca</strong>le (i.e., no colour).<br />

1. Flat shading<br />

Description:<br />

Brightest point:

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

Saved successfully!

Ooh no, something went wrong!