This application generates 2-dimensional images by projecting 3-dimensional viewing rays onto a 3-dimensional scene. Ambient, point, and directional lights reflect off of spheres and triangles to produce realistic lighting effects by using the Phong reflection model. These shapes contain material properties which also affect the lighting calculations.
Below is an image created with one ambient and and two point light sources. The first sphere mostly reflects blue light from ambient sources, while the second sphere reflects mostly red and green light from point and directional light sources.
This next image shows a triangle being illuminated from an ambient light source and a point light source located in the upper left region above the triangle.