Digital Bauhaus Vorkurs/Projekte/Kleckse/Ellipse Spritzer: Difference between revisions
From Medien Wiki
< Digital Bauhaus Vorkurs | Projekte | Kleckse
(Created page with " int x = width/2; int y = height/2; int s = 10; int c = 255; int a; int klexkomplex = 5; int dichteMin = -10; int dichteMax = 10; void setup () { size(700,700); smooth(); ba...") |
mNo edit summary |
||
Line 1: | Line 1: | ||
<source lang="Java"> | |||
int x = width/2; | int x = width/2; | ||
Line 75: | Line 75: | ||
} | } | ||
} | } | ||
</source> |
Revision as of 15:51, 17 April 2011
int x = width/2;
int y = height/2;
int s = 10;
int c = 255;
int a;
int klexkomplex = 5;
int dichteMin = -10;
int dichteMax = 10;
void setup () {
size(700,700);
smooth();
background(0);
noStroke();
reset();
ellipse(x,y,s,s);
}
void reset() {
background (255);
x = (int)random(width);
y = (int)random(height);
s = (int)random(255);
c = (int)random(238);
}
void draw () {
if(klexkomplex > (width/15) ) {
return;
}
ellipse(x,y,s,s);
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(255);
a= (int)random(0,100);
s = (int)random(dichteMin,dichteMax);
fill(c, 191, 255);
}
ellipse(x,y,s,s);
}
void keyPressed() {
if ((key== 'r')) {
reset();
}
}
void c() {
if (key== 'h') {
}
}