CS 445/645: Introduction to Computer Graphics
Assignment #3
Goal: Implement Sutherland-Hodgeman clipping for arbitrary planes.
URL: http://www.cs.virginia.edu/~gfx/Courses/2000/intro.fall01/Exercises/assignment3.htm
Assigned: Thursday, October 4th, 2001
Due: Sunday, October 21, 2001 at Midnight
Test Cases Used For Grading:
Relevant reading/files/software:
Synopsis: Your program will read a command-line specified parameter file, load a polygonal object, clip the polygonal object with two clipping planes, and use OpenGL to render it. 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.
Collaboration/Web Resources: Unlike previous assignments for this course, you cannot use resources from the web to do this assignment. Code segments for the tasks in the assignment are probably floating around the web and it is inappropriate to use any of them. As per the earlier assignments, you can still talk to your classmates about your work, but you cannot look at each other's code or work side-by-side to generate your code.
Specifics: We are providing a Makefile and a C++ skeleton file named assign3.cpp. The assign3.cpp 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 assign3.cpp, adding code to draw the scene and handle callbacks. Some special things to notice about the code:
prompt> assign3 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: