UdK Berlin Rundgang 2021

ABC

Yasemin Çakır

ABC random iteration

float spacing = 42;

void setup(){
  size(804,804);
  
  draw();
  background(255, 52, 22);
  noStroke();
  
  for(int x=5; x < width; x+= spacing+5){
    for(int y=5; y < height; y+= spacing+5){
      float r = random(100);
      fill(240);

   if(r<33) {
      rect(x,y, 42, 18); 
      rect(x,y, 12, 42);
      rect(x+30,y, 12, 42);
      rect(x+16,y+23, 10, 10);
  } else if(r>34 && r<66){ 
      circle(x+22, y+11, 22);
      circle(x+22, y+30, 22);
      rect(x,y, 16, 42);
  } else { 
     rect(x,y, 18, 35); 
     rect(x,y, 35, 12);
     rect(x,y+30, 35, 12);
    }
    }       
  }
}
Kontext