Files
FreeJ/scripts/processing/ventaglio.pde
Jaromil ae7b1ad056 progresses on processing script
processing-js 0.4 has been merged in some relevant parts
basic and topic scripts added for test
color handling fixed, more scripts show up now
2010-02-12 18:36:54 +01:00

29 lines
487 B
Plaintext

int W = 400;
int H = 300;
int cycle = 0;
int count = 0;
void setup() {
size(W,H);
background(0);
smooth();
};
void draw(){
if(cycle > 5) {
cycle = 0;
stroke(floor(random(255)),
floor(random(255)),
floor(random(255)), 60 );
};
if(count > 799) {
count = 0;
};
for (int i = 0; i < 100; i++) {
float r = random(2);
strokeWeight(r);
float offset = r * count;
line(i-20, H, i+offset, 0);
}
cycle++;
count+=5;
}