COSC 286: Computer Graphics

Project 3
Spring 2007

Due: Feb 20 @ 5 P.M.
10 points

Implement a polygon table to store two-dimensional objects. Using the DoubleMatix class from Project 1, implement the 2D transformation functions T(tx, ty), S(sx, sy), S(sx, sy, xf, yf), R(theta), R(theta, xr, yr). Implement the viewing transformation for the two-dimensional case. Demonstrate that the object representation and the various transformation functions work using a simple two-dimensional object, such as a square.

Instructions for Submission:

All classes and class members must be documented with Doc comments.

In the header comments, provide the following information:

/**
 * @author <Name> (<E-mail Address>)
 *
 * In accordance with the class policies and Georgetown's Honor Code,
 * I certify that, with the exceptions of the class resources and those
 * items noted below, I have neither given nor received any assistance
 * on this project.
 */
When you are ready to submit your program for grading, create a compressed archive of a directory containing only your project's source, and use the submit program to (you guessed it) submit your project.

The directory's name should be the same as your net ID. For example, assume your net ID is ab123. Assume you're in the directory above the one containing your source code. If the directory p1 contains your project, then rename the directory to ab123.

If you need to include a message, put it in a file named README.

To make the archive smaller, remove any .class files:

% rm ab123/*.class

Use jar to create an archive:

% jar cf ab123.jar ab123

You can also use jar to create an archive containing only the .java files:

% jar cf ab123.jar ab123/*.java

To use the submit command to submit your project, type

% java -jar submit.jar -a <assignment> -f <file>
where <assignment> is the assignment name and <file> is the name of your java-archive file. For instance, continuing the example, to submit, you would type
% java -jar submit.jar -a p1 -f abc123.jar
submit.jar should reside in the directory above your project directory. The first time you run submit, you'll have to provide your name and net ID.

Ideally, you should keep a copy on a university or department machine, such as seva. Make sure that your archive, directory, or files are not readable by others.

Submit your project before 5:00 P.M. on the due date.