Particle systems are widely used successful technique in computer graphics especially for visualizing the phenomenon called “Fuzzy”:

  • Fire
  • Smoke
  • Sparks
  • Meteors, Galaxies etc.

Particle Systems are first used in the movie called “Star Trek II: Wrath of the Khan” (I believe you hear scream of KHAAAN in your ears as me while reading this sentence) to visualize the wall of fire as illustrated in Figure-1 [1].

Figure-1: Wall of fire visualized using particle systems in movie Star Trek II - Wrath of the Khan [1]

Simulation is performed by a CPU based particle system implementation. In this simulation, I have provided a particle system to obtain fire effect, basically in my particle system particles age over time and their color is obtained using a function that depends on the distance from emitting point and particle age. Alpha blending does wonders in this particular simulation as you can see a galaxy is simulated using this system in Figure-2 below:

Figure-2: Galaxy Simulation that is obtained using particle system

My main simulation algorithm is as follows:

1. Set proper alpha blending;
2. Clear frame buffer to black;
3. Add new particles into the system with an initial assigned color velocity and mass;
4. Update the position of the particles based on the total force acting 
   on the particle, passed time and particle’s velocity;
5. Decrease lifetime of the particle according to the passed time;
6. Assign color and opacity for each particle based on 
   its current location and lifetime;
7. Render all textured particles in back-to-front order.
8. Go back to step 1.

Results:

Simulation runs on real time with constant 60 FPS in 1920 x 1080 with 1000 particles.

Specs:

GPU: NVIDIA GTX 560TI

CPU: AMD FX6100, 3.6 GHz, 6 core

Hope you enjoyed it $\triangle$


References

1 - W. T. Reeves. Particle system-a technique for modeling a class of fuzzy objects. Proceedings of SIGGRAPH,17(3):359–376, July 1983.