<- back to posts
11/12/2022

Experiments in Circle Packing

example 1 example 2 example 3 example 4

The Process

Circle packing has been something I've seen in some generative art pieces, but not something I've attempted to make before. I tend not to have a purely algorithmic approach to my work--I usually end up half-implementing what I had in mind, and running with my mistakes (and definitely not because I am too lazy to look for my errors).

The basic premise of circle packing is this:

To check for intersections, we can compare every new circle with its distance to every existing circle. This is O(n^1), and there might be a more efficient solution.

Of the four pieces I made, only one of them is proper circle packing. In the other pieces, I made a mistake where I only check for circle intersections with my starting pool of circles. Regardless, I got some results I was happy with.

Source code and full animations on OpenProcessing below.

back to top