CMPS 160 -- Lab Assignment 4
Due date:
Thursday, April 25, 2013
Objectives:
Diffuse reflection of Lambertian surfaces.
Description
-
Modify the 3rd lab exercise so that the triangles are filled
using diffuse reflection.
To do this, you need to
calculate a surface normal for each triangle in your fractal terrain.
This surface normal will be used to calculate surface shading from a
fixed light source accounting for diffuse reflections.
Assume the light source is the sun at high noon --
pure white, directional light source, from straight up [0,0,1].
The surface color is the same as in prog1.
This is called flat or constant shading.
The interesting thing with this shading is that it's independent of
viewer position and orientation i.e. the equation only relies on surface
normal and light direction and does not involve viewer information.
With diffuse reflection, you should now be able to see 3D visual cues
in your rendering.
Grading:
Note: all lab and programming assignments must include a statically linked executable.
This lab assignment will form part of your CMPS 160L grade.
The other component of CMPS 160L grade is your attendance.
Submission:
Submission must be done using the "submit" command from CATS.
- submit cmps160-ap.s13 lab4 lab4.tar, or
- submit cmps160-ap.s13 lab4 lab4.zip
This command should work from unix.ic.ucsc.edu.
Create and submit a subdirectory called lab4.
It should contain the executable and
all the files you have to make your program compile/run.
Tar or zip up lab4 before submitting.
Last modified
Saturday, 27-Apr-2013 00:34:36 PDT.