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

I(lambda) = k_{d }C(lambda) I_{a} +
I_{p}[k_{d }C(lambda) **L.N** + k_{s}
(**H.N**)^{n}]

where

- I(lambda) is the "intensity" of the surface (a function of wavelength, lambda)
- k
_{d }is the diffuse reflectance of the surface (0 - 1) - C(lambda) is the surface colour (a function of wavelength, lambda)
- I
_{a}is the ambient intensity (assumed to be white light) - I
_{p}is the point light source intensity (also assumed to be white) **L**is a unit vector from the surface towards the point light source**N**is the unit surface normal vector- k
_{s}is the specular reflectance of the surface (0 - 1) **H**is a unit vector halfway between**L**and**V****V**is the unit vector from the surface to the view point- n is the highlight exponent

In the applet below, I_{p} = 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.