This video demonstrates a “circle packing”-like algorithm. Circles are placed randomly in the canvas, but only if they are not overlapping with any previous circles. This is referred to as “uniform random sampling.” The p5.js dist() function is demonstrated.

Source-code:

Contact:

All JavaScript/p5.js videos:

Help us caption & translate this video!