Assignment 2: Particle explosion simulation
DATE DUE: March 20, 2017
Points possible: 10 points
CS-116B: Computer Graphics Algorithms
Instructor: Robert 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 in (x,y,z) space 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.

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 (i.e. acceleration is zero).

To calculate your displacement (s) at a given time, t, use:
s = v * t

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 or any drag forces on the particles.

You do not need to consider the mass of the particles.

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

A makefile to build particle_explosion.c is located at: http://www.cs.sjsu.edu/~bruce/programs/spring_2017_cs116b/particle_explosion/Makefile (right mouse click then press "Save Link As...")

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)

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

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.