< Digital Bauhaus Vorkurs | Projekte | Kleckse
int x = width/2;
int y = height/2;
int s = 10;
int c = 255;
int t = 10;
int z = 255;
int klexkomplex = 5;
int dichteMin = -10;
int dichteMax = 10;
void setup () {
size(700, 700);
smooth();
noStroke();
frameRate(10);
reset();
background(256, 256, 256);
fill( 120, 130, 200, 210);
}
void reset() {
background (256, 256, 256);
x = (int)random(width);
y = (int)random(height);
s = (int)random(256);
c = (int)random(238);
}
void draw() {
ellipse(x,y,s,s);
ellipse(x+3,y+3,s+3,s+3);
int i;
for(i=0; i<klexkomplex; i=i+1) {
x = x + (int)random(dichteMin,dichteMax);
y = y + (int)random(dichteMin,dichteMax);
c = (int)random(200, 255);
s = s + (int)random(dichteMin,dichteMax);
t = (int)random(255);
z = (int)random(dichteMin,dichteMax);
fill(193, 94, 50, 210);
}
ellipse(x,y,s,s);
ellipse(x+3,y+3,s+3,s+3);
ellipse(x-300, y+3, z+3, z+3);
ellipse(x+200, y-50, s+40, s+40);
}
void keyPressed() {
if ((key== 'r')) {
reset();
}
if (key== 'e') {
exit();
}
}