Digital Bauhaus Vorkurs/Projekte/Kleckse/Chaos

From Medien Wiki
< Digital Bauhaus Vorkurs‎ | Projekte‎ | Kleckse
Revision as of 09:04, 11 April 2011 by Nicola (talk | contribs) (Created page with " 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(70...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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(); 
 reset();
 background(256, 256, 256);
 fill( 120, 130, 200, 210);
for (int i = 20; i < 400; i += 90) {
 ellipse(i, 0, i + i/2, 80);
 ellipse(i + i/2, 10, i*1, 100);
 ellipse(i + 480, 20, i + i*1.5, 300);
 ellipse(i + i/2, 10, i*1, 100);
}


}

void reset() {

 background (255, 127, 36);
 x = (int)random(width);
 y = (int)random(height);
 s = (int)random(255);
 c = (int)random(238);
 

}

void draw () {

if(klexkomplex > (width/15) ) {
  return;
}


 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);
   s = c + (int)random(dichteMin,dichteMax);
   t = (int)random(255);
   z = (int)random(dichteMin,dichteMax);
   fill(240, 128, 128, 200);
   
 }
 
 ellipse(x,y,s,s);
 ellipse(x+3,y+3,s+3,s+3);
 

 fill ( 120, 130, 200);
 ellipse(x,y,z,z);
 ellipse(x+3, y+3, z+3, z+3);
 ellipse(x+300,y, z, z);
 ellipse(x+300, y+3, z+3, z+3);
 ellipse(x-300, y, z, z);
 ellipse(x-300, y+3, z+3, z+3);
 
 

}