Assignment 4 - 3D Transformations

CS4961 - Computer Graphics

Due March 23, 2001, 11:59 PM

NOTE: NEW DEADLINE


Overview

This project builds on your previous projects to implement line and polygon clipping in 3D. You will need to use your Bresenham line drawer as well as your polygon clipping algorithm for this project.

Project Requirements

The following are requirements for the project.

The following item is now optional in the assignment. Bonus points will be awarded for those who make visible progress towards getting it to work. (Visible meaning, something I can see on the screen.)
BONUS: You may create near, far, top, bottom, left, and right clipping planes. The user should be able to specify their coordinates (using a min-x, max-x, min-y, max-y, min-z, max-z method). In the orthographic projection, these clipping planes will form a rectangle. In the perspective projection, these clipping planes will form a truncated pyramid (frustum). You may use any reasonable method to allow the user to specify the clipping boundries. Clip the objects so they only exist within the confines of the clipping boundries. You should connect clipped edges. For example, if a corner of the cube was clipped, the clipped edges would be connected by a triangle.

Again, GL and GLUT both contain functions that will perform these functions. YOU MAY NOT USE THEM. All lines must be drawn using your Bresenham line drawer and must be drawn to the canvas as in your previous two assignments. In addition to the above requirements, include: Turn in all your code and documentation using submit (on CS machines) or handin on CADE machines. Your code will be tested using whatever environment you turn it in on (CS or CADE). Your code should be written in C/C++ and compile using gcc/g++. The project folder for submit and handin is named transformations. (submit cs4961 transformations file1 file2...)

To help make sure things are clear, I have included a demo program. It is compiled to run on the CADE Suns. It contains a single cube that can be rotated, translated and scaled. The axes are displayed by drawing an axis grid from the center of the cube through the appropriate faces. The red, green, and blue colors correspond to the X, Y, and Z axes respectively. The cube is drawn using the required perspective transform. You do not need to use the same interface, but will need your interface to do the same things (among others). PLEASE NOTE: this application implements a subset of the requirements for the project. It is your responsibility to get everything implemented. Send email to teach-cs4961@cs.utah.edu if you have questions.

Additional Notes

This section contains any additional notes regarding this project either due to questions raised by students or discoveries of my own. I will send messages to the class mailing list announcing any notes or clarifications, but this will contain a digest of all such info. These notes will never change what is required in the project, but may clarify some formerly ambiguous points and so should be checked semi-regularly.