Processing Month, Day 30 - Particle System

Posted by Jan Vantomme on 30 May 2011.
Tags:

Today, I’ve used the algorithm we programmed on day 2 to create a simple particle system. Each particle has a location and velocity vector and a color. If the particle goes off-screen, it dies and a new one will be born. This is an easy way to create a continously animated system. When the particles get close enough to each other, a line is drawn between them. I’ve used lerp() to calculate the location of the dots on those lines and lerpColor() to calculate the color of each dot.

Example

I’ve used the video library to render the animation as a movie file. The HD video is also available on Vimeo.

Download

Download the sketch for the particle system.

Tweet this article