Department of Computer Science
Worcester Polytechnic Institute

CS-4732: Computer Animation
Project 0: Hello, Animated Cube!
Due: Thursday, March 14, 2013 at 11:59pm

Objective: In this project, you will get your development environment up and running, and make something move. The project consists of two parts: a "Preparation" part and a "New Stuff" part.

This project must be done individually.


Preparation: The aim of this preparation part is to get your development environment working. You are free to use either OpenGL or Java3D. Here we provide only one method for installing OpenGL. You are free to use any development environment you choose, as long as we can compile and run your code for grading.

If you prefer NOT to use MinGW, you can skip to the "New Stuff" section and start this simple project.


Setup: Here is a Makefile that works on ccc.wpi.edu, and here is a Makefile for Mac OSX. These are just samples, and assume that your OpenGL program is in a file called cs4732_ass1.cpp. Change the names accordingly for your program. Here's a sample output from using the Makefile:

> ls
cs4732_proj0.cpp  Makefile
> make
g++ -o proj0 cs4732_proj0.cpp -lglut -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lm
> ls
cs4732_proj0.cpp  proj0  Makefile
> ./proj0
[program runs]
> make
make: `proj0' is up to date.
> make clean
rm proj0

Prep Coding:
  1. This part is simple. Just create a "cs4732_proj0.cpp" (or "cs4732_proj0.java") file.
  2. Compile and run the program!!

New Stuff: The aim of this part is to get you to move something around on the screen. You've already mastered drawing things on the screen from CS 4731 (right?), so now you just have to get it to move!

The bar is (arguably) low for this project. Just put an object on the screen (e.g., a cube) and have it rotate (or translate, or scale). You should produce about 10 seconds of motion. The only exception to this approach is, you are not allowed to rotate a sphere. :-)


Structure: As some of you have probably noticed, a good approach of how to attack this project is through successive refinement. Start out simple, and just get the basics to work. You might start out with a high-level structure of function calls you plan to code. For example, you might have a main that looks like this:
const int numFrames = 300; // Number of frames to generate.
int main( int argc, char ** argv )  {
  for( int frame = 0; frame < numFrames; frame++ )  {
    animateScene( );
    drawScene( );
  }
}

Then drill down into each of these routines to add functionality, testing each one as you go.


Documentation: You must create adequate documentation, both internal and external, along with your project. The best way to produce internal documentation is by including inline comments. The preferred way to do this is to write the comments as you code. Get in the habit of writing comments as you type in your code. A good rule of thumb is that all code that does something non-trivial should have comments describing what you are doing. This is as much for others who might have to maintain your code, as for you (imagine you have to go back and maintain code you have not looked at for six months -- this WILL happen to you in the future!).

Create a README file containing all information you would like the TA to know when grading your work.

I use these file and function (method) headers, in my code. Please adopt these (or some other consistent convention) for all your projects. The file header should be used for both ".h" and ".cpp/.java" files.

Create external documentation for your program and submit it along with the project. The documentation does not have to be unnecessarily long, but should explain briefly what each part of your program does, and how your filenames tie in. Most importantly, tell the TA how to compile and run your program.

Create a YouTube video of your work, upload it, and submit the URL along with your documentation.


What to
Turn in:
Submit everything you need to compile and run your program (source files, data files, etc.)

BEFORE YOU SUBMIT YOUR PROJECT, put everything in one directory, compile it, and make sure it runs.

When you are ready to submit, zip everything up into a single archive file. Name the file LastName_FirstName_proj0.zip.

You will use the Web-based "Turnin" facility to submit your work. Information about submitting can be found here:

https://turnin.cs.wpi.edu/.

Use your WPI user ID to login, and you should have been emailed a password.
The Turnin assignment ID is proj0.


Academic
Honesty:
Remember the official WPI statements on Academic Honesty. You may discuss the project with others, but you are to do your own work.


Back to course page.