Digital Bauhaus Vorkurs/Projekte/Kleckse/Kampf der Kleckse

From Medien Wiki
< Digital Bauhaus Vorkurs‎ | Projekte‎ | Kleckse
(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 (256, 256, 256);
  x = (int)random(width);
  y = (int)random(height);
  s = (int)random(256);
  c = (int)random(238);
  
}  


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

  ellipse(x,y,z,z);
  ellipse(x+3,y+3,z+3,z+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(255);
    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,z+3,z+3);
 
  
  ellipse(x-300, y+3, z+3, z+3);
  
  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+200, y-50, z+40, z+40); //ja oder nein??
 

  
  if(mousePressed) {
     noStroke();
     fill(193, 94, 50); 
     } else {
     fill ( 120, 130, 200, 9);
     
  }
  ellipse  (132, 82, mouseX, mouseY);
  ellipse  (228, -16, mouseX, mouseY);
  
  if(mousePressed) {
    noStroke();
    fill(120, 130, 200, 9);
  }
  
  ellipse  (132, 82, mouseX, mouseY);
  ellipse  (228, -16, mouseX, mouseY);

}



void keyPressed() {
  if ((key== 'r')) {
    reset(); 
  }
  if (key== 'h') {
    exit();
  }
}