Skip to content

Instantly share code, notes, and snippets.

@Fabax
Created August 18, 2013 17:39
Show Gist options
  • Save Fabax/6262904 to your computer and use it in GitHub Desktop.
Save Fabax/6262904 to your computer and use it in GitHub Desktop.
size(400, 400);
noStroke();
background(23, 100, 240);
float x = 0;
while (x < width) {
float y = 0;
while (y < height) {
// in rare cases, paint using red color
if (random(100) > 98) {
fill(255, 0, 0);
}
else {
// but usually pick a random gray color
fill(random(0, 105));
}
ellipse(x + 20, y + 20, 44, 44);
y = y + 10;
}
x = x + 50;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment