Oly­m­p­i­c Games Random Draw

by Julia Spyrou
  • Show Sketch
/* @peep sketchcode */
 
// OLYMPIC GAMES RINGS //
 
void setup() {
  size(1000, 650);
  smooth();
  background (255,255,255);
noFill ();
stroke (14,142,203); //blue 
strokeWeight (10);
 
  for (int x = 50; x < width; x +=50) {
    for (int y = 40; y < height; y +=40) {
      float r1 = random(40,70);
      fill(255,random(340));
      ellipse(x,random(y),r1,r1);
    }
  }
 
stroke (0,0,0);
 
  for (int x = 40; x < width; x +=40) {
    for (int y = 60; y < height; y +=60) {
      float r1 = random(40,70);
      fill(255,random(300));
      ellipse(x,random(y),r1,r1);
    }
  }
 
stroke (209,25,28); // red
 
  for (int x = 50; x < width; x +=50) {
    for (int y = 100; y < height; y +=100) {
      float r1 = random(40,70);
      fill(255,random(0));
      ellipse(x,random(y),r1,r1);
    }
  }
  stroke(19,113,23); //green
 
  for (int x = 60; x < width; x +=60) {
    for (int y = 100; y < height; y +=100) {
      float r1 = random(40,70);
      fill(255,random(0));
      ellipse(x,random(y),r1,r1);
    }
  }
 
stroke (222,177,27); // yellow
 
  for (int x = 100; x < width; x +=100) {
    for (int y = 200; y < height; y +=200) {
      float r1 = random(40,70);
      fill(255,random(20));
      ellipse(x,random(y),r1,r1);
    }
  }
}

Comments

Nobody has said anything yet.