The goal of this homework is to implement simple scan conversion with z-buffering. Implement the scanline fill algorithm discussed in section 7.10.6. Your algorithm can be much simpler than what is discussed: at this point the only primitive being drawn is a triangle (how can you exploit this fact?). Z-buffering is easy to implement once the basic fill is working.
HINT: Follow the scan line algorithm discussed. In previous years many people tried to develop their own "innovative" fill methods. Very few of them ever worked properly. HW04 was the most difficult assignment last year.
Implementing some form of backface culling. Many different algorithms for this exist and these will greatly increase rendering performance. The surface normal test discussed in class is usually the easiest and can be done right at the beginning of your draw triangles method.
Make sure to interpolate all of the attributes for each vertex so the color and depth will be appropriate. HINT: worry about the interpolation last and get the triangle filling to work first.
The homework is due at the start of class on Monday (Note the change in deadline due to missed class).
Use the code from the previous assignment. Develop supplementary classes to help with the current task.
You will submit a tar file containing all of the source code, a Makefile and a README file. The source code must compile (and run) on a CCC machine. Feel free to develop on any platform you like, just make sure things run on CCC before submitting. The program should compile when make is invoked on the command line in the directory with your code. Submissions which do not compile when make is typed, or do not run successfully, will not be graded and given 0 points.
The README file should contain an extensive description of what you are handing in, the layout of your code (what you have changed, what files you are submitting, and a discussion of the overall algorithm). This README file will count towards your grade. Submissions without a README or submissions with a worthless README will not be graded and given 0 points.
Submittal will be made using the turnin program. Here are the commands (on CCC) you will use for a submittal:
Each homework assignment is graded on a 10 point scale (this is 10 points towards your final grade). 6 points will be graded for functionality: the program does what the assignment requests. 2 points will be based on documentation in the README, and 2 points will be based on the quality of your design and coding style.
You will loose 1.5 points for handing the assignment in late. The late period for each hw is always until the start of the next class. Any assignment not handed in by the next class is a zero.
Since a grade of 0 will be given if the code does not compile and run, it is in your best interest not to submit anything until you have completely tested and evaluated what you have written.