CS 184: COMPUTER GRAPHICS

Working with the Lighting/Shading equations.

Given a directional white light source (sun) sending 3 trillion photons per second per mm2

shining at an angle of 60 degrees (measured against the normal vector) onto a cyan-colored, lacquered surface

with those specifications:    color = (0.2  1.0  0.7),     ka = kd = 0.2,      ks = 0.8,      ksp = 75,      ksm = 0.6;

the surface is in an environment of yellow ambient light:    color = (1.0  1.0  0.0),    I =  0.4*1012 photons / s / mm2.

Calculate the intensities of the (r,g,b) components sent towards an eye located in direction of the ideally reflected rays.

Ieye, r = _____ ;      Ieye, g = _____ ;      Ieye, b = _____ .

Calculate the diffusely reflected components:

I'd   = (  Ia + Id*cos(inc.angle) ) * kd * (r,g,b):
I'dR = (  0.2   +  1 * 0.5   )    *   0.2    *  (0.2)  = 0.028 
*1012 photons / s / mm2.
I'dG = (  0.2
   +  1 * 0.5   )    *   0.2    *  (1.0)  = 0.14    *1012 photons / s / mm2.
I'dB = (  0.0   +  1 * 0.5   )    *   0.2    *  (0.7)  = 0.07    *1012 photons / s / mm2.

Calculate the speculalrly reflected component:

I's   = Id  * ks * (Phong.Factor) * (adjusted color):
I'sR = 1  * 0.8  *       (1.0)          * (0.6*0.2 + 0.4*1.0)  = 0.416  *1012 photons / s / mm2.
I'sG = 1  * 0.8  *       (1.0)          * (0.6*1.0 + 0.4*1.0)  = 0.8      *1012 photons / s / mm2.
I'sB = 1  * 0.8  *       (1.0)          * (0.6*0.7 + 0.4*1.0)  = 0.656  *1012 photons / s / mm2.

Sum up the components:

I'totalR  = 0.444  *1012 photons / s / mm2.
I'totalG  = 0.94    *1012 photons / s / mm2.
I'totalB  = 0.663  *1012 photons / s / mm2.

This kind of computation has to be done by your raytracer every time it hits a surface !

Page Editor: Carlo H. Séquin