Simulation of Fireworks

 


Here is a description of my project, for the Advanced Graphics course. I studied particle systems, and their applications to computer graphics. I decided to implement a firework simulator, with the particles in the system corresponding to firework particles.

Particle Attributes

  1. Velocity and Position: Computed by simple kinematics of projectile motion.
  2. Color: I worked with a fixed base colour, with piecewise linear variations in brightness
  3. Lifetime: The particles were killed before they hit the ground, the time of death being randomly computed.

Implementation

This was in C++, using OpenGL (Mesa). The life history of all particles for the firework's duration is computed at startup. Minimal computation is done in real time. At each frame, new particles are are fed into the system. These, along with existing particles are rendered, and have their positions updated. Finally, any particles to be killed are removed

Because we work with 80,000 to 200,000 particles, we need at 20-30M of memory, In particluar, the program does not run machines with 64M RAM. It ran with noticeable slowness on 128M machines. To optimize, we made extensive use of doubly linked lists.

Samples

Presentation

As part of the project, I gave a presentation to the class on the uses of particle systems in rendering various natural phenomena - splashing water surfaces, forests, and fireworks. Here are the PowerPoint 95 slides.

Main Reference:

Loke, Tan, Seah, Er. "Rendering Fireworks Displays"
Computer Graphics and Applications

 Vaibhav Vaish
(csu96173@cse.iitd.ernet.in)