This entirely self-contained particle engine was written in C++ and includes the following features/effects:
-Completely implemented inside a C++ class, so the user can include the engine in any OpenGL project by making calls to only a few simple functions
-User-specifiable emitter-position
-Line sources or point sources
-User-specifiable angle of emission
-Variable particle emission velocities
-Variable particle lifetimes
-Variable particle sizes
-Textured/colored/blended particles
-Universal (i.e. specified by a direction) Gravity
-Local (i.e. specified by a point) gravity
-Time-based or Frame-based movement
For a complete description of the engine’s implementation, click here.
For a demo executable, click here.
Otherwise, check out the snapshots below!
Here is a shot of
the driver I wrote for testing & debugging; it’s a simple windows dialog
box that controls the particle engine.
The actual rendering is performed in a separate GLUT window that pops up
when you click “Init Glut”:

Here are some particles shooting out towards the left, and being sucked in by a gravity-point near the center of the cube;
The cube is included in the background to show the particles’ transparency.

Here, the particles are being emitted straight up, and being sucked into a gravity-point just above and to the right of the emitter

This is what happens if you give a gravity-point a negative strength: it repels particles

All of the above examples use some randomization for the particle lifetimes, therefore particles are emitted in a constant stream. Below, every particle has the same lifetime, so they are emitted in bursts
that look like rings coming out from one point

Here is an example where the emitter bursts new particles out before reclaiming all of the particles from a previous burst

This is what a line-source looks like, with solid (non-blended) particles

Finally, some general gravity in the y-direction…looks like a water fountain!
