|
source code not provided, because there were just too many variations. all, however, are based on the following: | |
void step()
{
for( int i=0; i<parts.length; i++ )
{
float d = dist(x,y,parts[i].x,parts[i].y);
if( d < PROX )
{
stroke(r,g,b,d);
line(x,y,parts[i].x,parts[i].y);
vx += .00001*(parts[i].x - x);
vy += .00001*(parts[i].y - y);
}
}
x += vx;
y += vy;
}
| |
all images copyright 2004 lucas kuzma |
|