The Illumation model

An Illumination model expresses the different factors that determine a surface's color at a given point. The simplest model uses only the intrinsic intensity of an object. (The ambient color). Then all surfaces of an object have the same color (with looks rather ugly).

An illumination model for object who exhibit diffuse reflection can be accomplished by adding a single point light source to the scene, whose rays emanate uniformly in all directions. This can be modelled for a given point on the objects surface by calculating the angle between the surface normal and the vector from the surface to the light. If both the normal and the light vector are normalized this angle is simple the dot product of the two vectors.

When you also want to model specular reflection, that is responsible for the highlight that appears on nonperfect reflecting surfaces, the Phong Illumination can be used. On perfect reflection surfaces like a mirror the highlight can only by seen when you look at the reflection vector, that is the light vector mirrored about the normal vector. But with nonperfect reflectors the highlight can also be seen when the angle a between the viewer and the reflection is small. If a is zero the specular reflectance is the maximal, when a increases the reflectance sharply falls off. This falloff can be approximated with Phong's illumination model which uses cos a to the n-th power as the reflectance falloff, where n is the surfaces specular-reflection exponent. If both the reflection vector R and the view vector V are normalized the cos a can be calculated with the dot product between R and V.

There are plenty other models that can be used to model the color of a surface at a given point.