CMPS 160 -- Lab 2

Early if time stamp is before midnight Oct 15, 2016.
On time if time stamp is before midnight Oct 16, 2016.
Late submissions will not be accepted/graded.

Objectives:

Render SOR with diffuse lighting and flat shading.

Description:

Given the material property information, you will calculate the color for each polygon in the SOR using diffuse Lambertian reflection.

Assume that each polygon in the SOR has the same material information:
Ka 0 0 0
Kd 0 1 0
Ks 0 0 0
Also assume that the light source is pure white (1, 1, 1) and is coming from the direction [1, 1, 1]. The viewer is still at (0,0,∞). Render the SOR but this time with flat shading and lit by the single light source.

Details:

Resources:

Read the descriptions and stare at the animations several times until you understand what's going on.

Directional lighting tutorial

Check out the shader code in ColoredCube code from the Matsuda-Lea book.

Grading:

Submission:

See course overview for instructions on what to submit and what not to submit.

Put materials in a folder named lab2 and zip it up. Submission must be done using the "submit" command from unix.ic.ucsc.edu


Last modified Tuesday, 22-Jan-2019 09:42:16 PST.