COSC 286: Computer Graphics

Project 4
Spring 2007

Due: Apr 4 @ 5 P.M.
10 points

Extend the code from project 3 to handle the representation of 3D objects and 3D transformations. Implement the viewing transformation for the three-dimensional case. Implement perspective projection. Implement the viewing transformation (i.e., the window to viewport transformation for the 3D case). Demonstrate that your program works for a simple three-dimensional object, such as a cube.

A few hints:

  1. When storing edges in the surface table, list them in clockwise order as if you were viewing the surface from outside the object.

  2. Model objects so their center is at the origin of the world coordinate system.

  3. Set the viewing transformations so you're looking down the positive z axis of the eye coordinate system (e.g., phi = 0.0, theta = 0.0, rho = 10.0, D = 5.0).

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.