This homework is considered optional for all students taking the course for undergraduate credit. If you do this assignment and you are seeking undergraduate credit, your grade on this homework will replace the single lowest homework grade you received on the previous five homeworks.
This assignment is required by students if they want to receive any graduate level credit for this course (MS, BS/MS, PHD).
The homework is due at the start of class on Thursday.
The goal of this homework is to fully implement the glClipPlane method (this must be added to the entire mgl object hierarchy). The functionality of your implementation should strictly follow the openGL standard.
HINT: Clipping could introduce a polygon that is not a triangle (namely, a quadrilateral). Make sure you adjust the result so that it can be handled by your existing drawing routines (e.g., you could make 2 triangles out of the resulting quad). When you introduce a new vertex into the triangle, make sure you determine the full attributes of that vertex (color, normal, etc). Determine these attributes using interpolation.
Add keys to your interface which slowly adjust each attribute of the clipping plane (set up something which seems intuitive to you). For instance, set up keys which create a rotating clipping plane that cuts the object in half. Set up reasonable defaults for the clipping planes so you can see the plane when the program starts.
HINT: You may want to turn off backface culling so you can see "inside" the objects.
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.
There is no late period for this assignment.