Crickets Chirping

mon qui si, mon qui d’où

Processing Sketch: Circle Packing

with 6 comments

This evening I implemented a circle packing algorithm in processing.


circlepack.jpg
Click here to run the applet.

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.

Written by banksean

June 18th, 2007 at 12:00 am

Posted in Code,General,Processing

6 Responses to 'Processing Sketch: Circle Packing'

Subscribe to comments with RSS

  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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

Leave a Reply