CS 4451 Computer Graphics

Assignment #3

Due: Friday March 29, 2001 at 11:59 PM

Problem Statement

The purpose of this assignment is to write a shader that implements Gouraud, Phong, and Flat shading as found in FVFH, Chapter 16.2 (pp. 734-741).  This uses the z-buffer algorithm as described in FVFH, Chapter 15.4 (pp.668-672) and Chapter 15.6 (pp.680-685). 

Startup Code and Sample Output

Sample code ( hw3.tar.gz) has been provided for you.  You are not required to use it, but I highly suggest using it. Aliasing occurs, but don't worry about that.   You should be able to implement everything just by filling in the areas marked /* CODE: */. All the code that you need to write is in P3.c. However, you will find functions defined elsewhere useful (matrixops.c).

The startup code does not display any kind of shading.  However, it does show the L, V, and N vectors for vertices and polygon faces. Sample views for flat, gouraud, and phong shading are in the sample code.  

Grading Criteria

-05 points:  no acceptable README file
-05 points:  no Makefile
-05 points: viewport not 500x500
-05 points: insufficient documentation
-10 points: does not display correctly

-10 points: incorrect Flat shading
-30 points: incorrect Gouraud shading
-30 points: incorrect Phong shading
 

DealBreakers:
-100 points:  uses OpenGL to display the shadings.
-75   points:  does not accept input
-60   points:  the program does not compile and/or does not run without coredumping.
 

Extra Credit

+25 points: implement all types of shading using OpenGL.

Notes

Submission Rules