Bradley Herrup
Assignment 3
CS263
Renderer with Lighting and Shading Model Implemented

Light and Shading Models

Met the Requirements of the Specificiation.

Basic:

  • Edge Class
  • Vertex Class
  • Polygon Class

Complex Classes:

  • GraphicObject Class(handles movement to world coordinates)
  • Pipeline Class(handles entire graphic pipeline for viewing coordinate to screen)
  • 3dPanel handles Device Coordinates
  • ZBuffer Class
  • ScanConvert Class(accesses ZBuffer to determine whether to draw or not)

Extensions:

  • ScanConvert is molded for each of the ShadingModels, and as a result the Panel Classes have be specialized for ease of use. There is now a Gouraud, Phong, and Constant Shading Class option. For each there exists a corresponding Panel3dX, Draw3dX
  • Light Class created to handle implementation of Phong Illumination Model, used Halfway vector instead of R, because light is assumed to be at infinity
  • Material Class to give each object its own material

Teapot Specularity:


n = 64


n=20


n=2

Phong High Spec Cow

Evolution of a Teapot:


Random Shading


Constant Shading


Gouraud Shading


Phong Shading