Random Circles
Adapted from the closely related p5.js Random Circles and Processing Random Circles, both created by Fabian Morón Zirfas.
Both originals express the same teaching idea with equivalent loop structure. This GIC adaptation follows the Processing version's opaque gray ground and outlined circles, with randomly chosen radii that vary between runs.
// ABOUTME: Fills a regular grid with circles whose radii are chosen at random.
// ABOUTME: Demonstrates how random variation gives repeated marks a textured rhythm.
// Inspired by Fabian Morón Zirfas's Processing Random Circles:
// https://github.com/ff6347/gestalten-in-code/tree/e8b8f8446c13c01494ccfd1e92ce2bb1638daf66/chance/processing/random_circles
// Related p5.js version by Fabian Morón Zirfas:
// https://github.com/ff6347/gestalten-in-code/tree/e8b8f8446c13c01494ccfd1e92ce2bb1638daf66/chance/p5js/random_circles
background("#cccccc");
fill("#ffffff");
stroke("#000000");
strokeWidth(0.2);
repeat(y, 1, 100, 5) {
repeat(x, 1, 100, 5) {
circle(x, y, random(0, 2.5));
}
}