# Circle packing: Once again

**URL:** <https://openrndr.discourse.group/t/circle-packing-once-again/480>\
**Category:** Tutorials\
**Created:** [December 29, 2022, 1:09pm UTC](https://openrndr.discourse.group/t/circle-packing-once-again/480 "2022-12-29T13:09:16Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Alessandro](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/alessandro/32/412_2.png) [@Alessandro](https://openrndr.discourse.group/u/Alessandro)\
**Post date:** [December 30, 2022, 1:06pm UTC](https://openrndr.discourse.group/t/circle-packing-once-again/480/3 "2022-12-30T13:06:40Z")

</div>

> [@abe](#):
>
> I ported a [non-animated version](https://github.com/hamoid/openrndr-template/blob/master/src/main/kotlin/apps/p5/p09_circlePacking.kt) and there’s a [looong thread](https://discourse.processing.org/t/writing-processing-in-kotlin/3957) in the Processing forum. Wow 4 years ago already!

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](https://openrndr.discourse.group/t/screenrecorder-and-cropping-videos/468/8) 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 🙂 ) 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. 🙂

---

_[View the full topic](https://openrndr.discourse.group/t/circle-packing-once-again/480)._
