The Phong Reflection Model
Many different algorithms can simulate the reflection of light, but the one you’ll implement here is called the Phong reflection model (named for Bui Tuong Phong, the researcher who developed it). It simulates the interaction between three different types of lighting:
-
Ambient reflection is background lighting, or light reflected from other objects in the environment. The Phong model treats this as a constant, coloring all points on the surface equally.
-
Diffuse reflection is light reflected from a matte surface. It depends only on the angle between the light source and the surface normal.
-
Specular reflection is the reflection of the light source itself and results in what is called a specular highlight—the bright ...
Get The Ray Tracer Challenge now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.