This applet allows you to experiment with various parameters of a
lighting model. The relevant reading is paragraph 14.2 of Hearn &
Baker, especially pages 497-504. A few notes:
- There's one light in the scene, at the position of the white cross-hair.
The light is white, and its intensity is
- Specular highlights are done using Phong's shading model
- The spheres
are raytraced individually, going from the furthest to the closest sphere.
This means you won't see any shadows.
Click here for a list of all applets.
For those of you without the book, an explanation of the lighting model parameters:
|k_a||material's ambient coefficient|
|I_a||ambient light (R, G and B)|
|k_d||material's diffuse coefficient|
|I_l||light (at crosshair) intensity (R, G and B)|
|N||surface normal at point of intersection|
|L||vector to light from point of intersection|
|k_s||material's specular coefficient|
|V||vector to viewer from point of intersection|
|R||vector L reflected at point of intersection|
|n_s||material's specular reflection parameter|
Patrick Min, CS Department, Princeton University
Last modified: Wed Jul 21 03:46:10 EDT 2010