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
-
The hardest type of shading to do correctly is Phong. Therefore,
try Gouraud and Flat first. Get them working and then go to Phong.
-
Even though you have less than 100 lines of code to write, you must account for both coding AND
getting used to my code. So, don't delay!
-
Make use of the newsgroup to help each other out!
Submission Rules
-
The program must be written in C or C++ and compile and run using OpenGL
on an SGI Indy workstation in the CoC SGI lab. YOU must write the code
that implements the shading.
-
All source code (that you write) must be well documented (documentation
is an indicator of understanding!)
-
You MUST include a README file that details both how well your program
works, and quirks it might have, and a statement that you are trying for
the extra credit (if you are doing so.) Also, you must tell me how
to run your program. Finally, let me know if you are using
a late token.
-
Ensure your name and login name appear in each file you submit.
- Put all
your files (including Makefile and README) in a directory on a CoC UNIX machine. Name
your directory last_first_3 where last is your LAST NAME and first is your FIRST NAME (The
"_3" corresponds to the assignment number). Then, from the parent directory, execute the
following command:
% tar -cvf last_first_3.tar last_first_3
For example:
I would create a directory Parry_Mitch_3,
% mkdir Parry_Mitch_3
copy my assignment files into it and tar it.
% tar -cvf Parry_Mitch_3.tar Parry_Mitch_3
This would tar everything in the directory Parry_Mitch_3 and put it into the file named
Parry_Mitch_3.tar.
Then email the file to parry@cc.gatech.edu.
-
You can submit as many times as you want, but only the submission closest to the due
date/time will be examined and graded.
-
No late submissions.