| Project Name | The drawing particle (tests) |
| Year | 2005 |
Back in 2005, I had the chance to assist to a Jared Tarbell conference during OFFF 2005.
Jared shared a little source code of a particle which he called the “firefly”. The code of a basic particle class in Processing would be basically something like this:
// Particle class
class Particle{
float x;
float y;
float vx;
float vy;
Particle(float _x, float _y, float _vx, float _vy){
x = _x;
y = _y;
vx = _vx;
vy = _vy;
}
void update(){
x = x + vx;
y = y + vy;
// change direction
vx += random(-1,1);
vy += random(-1,1);
//apply friction
vx *= 0.9;
vy *= 0.9;
}
}
I started to experiment a little bit while learning Processing syntax, the main idea was to use the particles to actually draw their routes instead of rendering them as moving objects.
The different results where obtained by applying different basic rules in the system.
| Posted on: | 14 / April / 2010 – 10:04:23 |
| Filed under: | Lab |
| Tagged width: | experimentation, particles, processing |