Haig Armen Educational Archive


Exercise 29

by Haig. Average Reading Time: less than a minute.

now let’s improve our grid sketch by overlapping the circles and giving them a random transparency


size(400, 400);
noStroke();
background(255);

float x = 0;
while (x < width) {
  float y = 0;
  while (y  98) {
      fill(255, 0, 0, random(50));
    } 
    else {
      // but usually pick a random gray color
      fill(random(100, 200), random(50));
    }

    ellipse(x+20, y+20, 40, 40);
    y = y + 20;
  }
  x = x + 20;
}

No comments on ‘Exercise 29’

Leave a Reply