CS 551/645: Introduction to Computer Graphics
Assignment #2
Goal: Implement Sutherland-Hodgeman clipping for arbitrary planes.
URL: http://www.cs.virginia.edu/~gfx/Courses/2000/intro.fall00.html/Assignments/assign2.html
Assigned: Tuesday, September 26, 2000
Due: Monday, October 9, 2000 at Midnight
Test Cases Used For Grading:
Clarification and Changes:
Relevant reading/files/software:
Synopsis: Your program will load a polygonal object and use OpenGL to render it. A command line argument to your program will specify the name of the model to load, the definitions of two planes, and rendering constants. You will write code to clip the model to the two arbitrary clipping planes using the Sutherland-Hodgman algorithm. Your OpenGL program will also support mouse navigation through the model. Grad students, note that your program must also support interactive repositioning of the clipping planes.
Specifics: We are providing a Makefile and a C++ skeleton file named assign2.C. The assign2.C file will set up lighting so that front-facing polygons will be drawn one color and back-facing polygons another. You will modify the functions in assign2.C, adding code to draw the scene and handle callbacks. Some special things to notice about the code:
prompt> assign2 parameter.file
modelname.poly
A B C D
E F G H
X
Advice: OpenGL has direct support for clipping to arbitrary planes. Don't even think about it. :-)
Turning in the assignment: