CPSC 120: Project 2

Due at 4:59 pm on Tuesday, 11/26/2013

Home | Announcements | Assignments | Example Code

Fireworks Extravaganza!

This project draws heavily on your work from Lab Assignment #4. If you had trouble completing that, or you completed it but were disappointed in your work nows your chance to improve it.

Create a simulation of a massive fireworks display. This display should launch multiple rockets from the ground, as many as five or six, from any of several randomly chosen locations. The rockets should have randomly chosen upwards trajectories, and each should explode at the very top its arc, with colorful sparks that rain down ad gradually disappear. It should have some variety in the timing of each rocket launch and explosion, and it's fine to limit the maximum number of rockets in the air (unlike, say, the towns of Oban or San Diego).

Meanwhile, the moon displayed in the sky should move across the heavens from left to right. This movement should be very slow! It should take perhaps 2-3 minutes for it to completely disappear off the right side of the screen.

Add other creative elements if you like: stars that also move across the heavens with the moon, a small flock of birds that moves (more rapidly) across the sky, a gradual lightening of the sky as time progresses toward daybreak, etc.

The key to organizing all of this is to define suitable objects that group together related attributes into individual entities: in particular, the definition of "rocket" and "moon" object types will prove essential. You'll have completed lab exercise #5 in the next day or two, and this should give you practice in the technical skills you need to finish everything.

Turn In:

Submit the folder containing your Processing sketch. This should be a single folder named "project2", which will contain your fireworks simulation, and any related files. You do not need to submit a paper printout of anything. Again, the turnin directory is


You may re-submit this work as many times as you like, up to the due date/time. Anything submitted after 4:59 pm on Monday 11/25 will be considered late (and every file contains a time stamp).


John H. E. Lasseter