Enough with single Particles, try an entire Particle System
Friday, November 14th, 2008More experiments with Processing and Particles. This one uses the wonderful Traer Physics library.
Rather than writing a custom Particle class and applying forces to them individually (as in my previous particle post), all I need to do is create a ParticleSystem instance, add forces as desired (none in this case), and Traer does the rest.
In this example, I continuously add particles in the center with random velocities, and continuously remove them when they’ve grown old. The particle.age() property also controls the size and transparency of each particle, which is simply an ellipse with a teal-ish fill. The moon is a PNG placed in the center. For a final touch, I use the built-in camera() function to zoom in an out, controlled by a Sine wave.




