Processing Sketch: Circle Packing
This evening I implemented a circle packing algorithm in processing.
I have some more ambitious ideas in mind for this, but what I really need is a hierarchical circle packing implementation like the one described here. I started down that road but I kept getting stumped by the math. That’s frustrating because it’s basic geometry and trig. The alternative algorithm I chose for this applet is much simpler and performs reasonably well for interactive use.

This is why people usually use treemaps— easier to get the geometry right when it’s rectangles. But then it wouldn’t be as pretty, right?
Josh
19 Jun 07 at 11:39 am
Hey, Nice Work. I was trying to code up a similar thing, and like you, used the InfoVis wiki paper for the guidelines. And I am getting stumped by the math too. Have you released the code for this applet? Thanks.
sriaknth
30 Apr 08 at 6:17 pm
I like it, bravo!
I’m looking for something which will allow me to have an hierachy too.
Did you persue it further ?
Matt
13 May 08 at 1:12 am
Hey, love this notebook. I wrote you a week or so ago about controlling the radii of the circles via a list of numbers from an external txt file. Is this possible?
Gabe
20 May 08 at 11:15 am
Hey great skecth I´m trying to do something similar but I want an increment of size in each circle and that stops when it collide with a neighbor I hope to get the way to solve this soon.
Rodrigo Medina
20 Aug 09 at 9:04 pm
You or anyone else interested in circle packing may wish to check out this program.
http://www.math.utk.edu/~kens/CirclePack/
Although constantly in development its free, easy to use, and creates fantastic pictures. It’s also designed so that users can write extenders for endless flexibility (I’m writing one now).
jim
2 Aug 10 at 9:59 am