Assignment 2: Particle explosion simulation
DATE DUE: March 7, 2016
Points possible: 10 points
CS-116B: Computer Graphics Algorithms
Instructor: Rob Bruce

OVERVIEW

For this assignment, you will simulate an exploding cube using particles.

SPECIFICATIONS

The program begins with a spinning cube. When the <space> key is pressed on the keyboard, the cube should disappear and explode into minimally 10,000 particles. Note: you may use more particles if you like.

Each particle should travel in a straight line in a random direction starting from the cube's position.

All particles should be the same exact same size and mass. Each particle should be drawn as one pixel. Hint: Use the glVertex() functions.

All particles should start out as one color (at the time of the explosion) but change color over time. Ultimately, the particles should fade to black to become invisible against the black background.

The particles will be moving at a constant velocity after the explosion occurs.

Each particle must appear to move over time (i.e. I want to see animated particles).

You do not need to consider any sort of collisions between particles.

You do not need to consider the impact of gravity on the particles.

You do not need to consider any sort of drag forces that would reduce the particle's speed over time.

I have provided you with a start program as basis for this assignment at: http://www.cs.sjsu.edu/~bruce/programs/spring_2016_cs116b/particle_explosion/particle_explosion.tar.gz (right mouse click then press "Save Link As...")

To unpack this archive, type the following command in a shell prompt: tar xzf particle_explosion.tar.gz

SUBMITTING YOUR PROGRAM

1. Please submit your program as a text file to the Canvas dropbox. I only need the source code. I will build the program myself.

2. Please name your program using the following naming convention:

Lastname_Firstname_assignment_2.c (for C programs)

Lastname_Firstname_assignment_2.cpp (for C++ programs)

Lastname_Firstname_assignment_2.java (for Java programs)

For example, my name is Rob Bruce. If I write my program in the C programming language, my assignment 2 should be named: Bruce_Rob_assignment_2.c

3. Please include your name as a comment at the beginning of your program like this:

/* Rob Bruce */

or this:

// Rob Bruce

4. I usually do not need a makefile to build your programs, regardless of language; however, in the unlikely event that I cannot build your project, I will send an email inquiry as appropriate.

5. I expect your program to build without syntax errors.

6. I expect your program to execute without run-time errors.

GRADING

Points will be deducted for any program that does not meet the specification as outlined above.

LATE ASSIGNMENTS

Assignments submitted after the due date will be worth, at most, 5 points. Additional points will be deducted for programs not meeting the specification as outlined above.