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 < height) {
if (random(100) > 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;
}
Leave a Reply