Phong Illumination Demo Applet

The applet below demonstrates the behaviour of the following variant of the Phong illumination formula:

I(lambda) = kd C(lambda) Ia + Ip[kd C(lambda) L.N + ks (H.N)n]


In the applet below, Ip = 1.

The panel at the top right shows the appearance of a sphere lit by a point light source in direction (1,1,1) and viewed from direction (0,0,1). The equation is evaluated at the usual three wavelengths - red, green and blue - to give an RGB colour. The sphere RGB colour, C, is (0.2, 0.6, 0.4).

The panel at the top left is a polar diagram showing how intensity varies with view angle for a given light source direction L. L is controlled by the separate slider under the polar diagram. Note that the value of L does not directly relate to the sphere image -- the surface normal direction varies over the area of the sphere with the result that the sphere image involves all possible L vectors.

Acknowledgements: Thanks to Kevin Novins for the original idea.