Programming assignment 2: Particle explosion simulation
CS-116B: Computer Graphics Algorithms
Instructor: Robert Bruce

Objective

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

Specifications

The program begins with a spinning cube. When the 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 https://www.robertjamesbruce.com/cs116b_assignment2.tar.gz (right mouse click then press "Save Link As...").