cos426.jpg (39279 bytes)

Computer Graphics, Spring 2006


Assignment 4: Particle Systems

Due on April 23 (Sunday) at 11:59 PM


Overview

This assignment will allow you to implement a basic particle system. At its simplest, your program will be able to spawn particles, apply forces such as gravity and drag to them, and bounce them off of geometry. Once you have the basic system in place, you have a broad selection of options to improve your system. You can choose to focus on the rendering or the physics of the particles. Improved rendering will allow for more convincing simulation of phenomena such as smoke, fire, and sparks. Improved physics will allow simulation of rope and cloth, or even flocks of birds or schools of fish.

We provide you with an OpenGL skeleton program that uses GLUT and GLUI. GLUI is a simple library that provides interface controls such as check boxes and sliders for your program. Your program will read .ray files, so that you have a source for your scene geometry. The skeleton code shares the .ray file reading and writing code with assignment 2, although we will extend the .ray format with several new classes to handle particle generation and management. Be sure to read the .ray particle extensions specification, along with the .ray file format specification and the assignment 2 code explanation if you need help. We provide you with a few scenes that may be useful in debugging your program. This assignment is fairly open-ended, however, so you should be prepared to create your own .ray files to better show off your new features.

NOTE: This is the first year that this assignment has been used. As a result, there may very well be bugs or unclear or unnecessarily difficult areas. If you run into problems that you don't think you should have, please email cos426@cs.princeton.edu.

 

 
 


Getting Started

You should use the code available here (4.tar.gz, 4.zip), as a starting point for your assignment. Most of the source files should be familiar from assignment 2. In addition, we provide you with a copy of GLUI, which is a user interface toolkit based on GLUT. We have included binaries for both Windows and Linux. Hopefully, these will be all that you need. If you find you need to build GLUI yourself, you can find the source at the GLUI sourceforge page. The Microsoft Visual Studio files included in the zip file are for .NET 2005. There are also project files and a GLUI binary for .NET 2003, if you use that instead (4_vc7.zip).

How the Program Works

The program takes in one argument, the name of the .ray file to read:
% particle in.ray

Feel free to add new arguments to deal with the new features you are implementing. Just make sure they are documented.

Hit p to pause the simulation and p again to unpause.


What You Have to Do

The following is a list of features that you may implement. We strongly advise that you implement the features roughly in the order they are described, and test your code after you implement each feature.

The assignment is worth 20 points. The number in parentheses corresponds to how many points a feature is worth.  Options in bold are mandatory.

Numerical Integration:

Rendering:

Interactive Control:

Particle Interaction:

By implementing all the required features, you get 12 points. There are many ways to get more points:

It is possible to get more than 20 points. However, as in the previous assignment, after 20 points, each point is divided by 2, and after 22 points, each point is divided by 4.


What Has Not Been (Completely) Implemented

The following functions have not been completely implemented:

 


What to Submit

You should submit:

The writeup should be a HTML document called assignment4.html which may include other documents or pictures. It should be brief, describing what you have implemented, what works and what doesn't, how you created the art contest images and/or movies, and any relevant instructions on how to run your interface.

Make sure the source code compiles on the machines in Friend 017. Always remember the late policy and the collaboration policy.


Hints

 


FAQ