Circle packing: Once again

Nice! These type of algorithms were (and still are!) really fun to explore.

I agree with the positioning of the path variables upfront, yes, it is much more accessible like this.
The variables w and h I mainly use in relation to this to make higher resolution images. Probably a good idea would also be to have something like map(0, w, 0, img.width, x * 1.0).toInt() and the correspective for y when accessing the shadow. It would still be left to the user to adjust the aspect ratio of the final resulting canvas, but one could achieve larger designs. Another thing that would be fun (no pun intended :slight_smile: ) is to draw the final circles with drawer.composition and save everything in an svg. Maybe something for the plotter episode of the OPENRNDR meetup. :slight_smile:

1 Like