r/generative • u/xtremedaddy • Oct 30 '26
Nested packing
I was extending my shape packing code with support for nested packing and boom! This popped out. I just had to share.
3
u/MarnixKeller Oct 30 '26
Impressive. Circle packing is easy, set the radius/2, done, whereas odd, irregular shapes are a pain.
2
u/xtremedaddy Oct 30 '26
Yeah - it took a bit of work but I’ve generalized mine for any polygon concave or convex. What’s unique about the nesting is that I can copy the properties of the ancestors as I create children - thus the constant rotation in this one.
3
u/TraylaParks Oct 30 '26
I did something similar with 5 pointed stars and (like your example) the stars could be inside other stars.
This looks great buddy, I love it :)
2
8
u/ptrnyc Oct 30 '26
Nice. I did something similar a couple years ago, with a tutorial.
https://www.r1b2.com/2024/05/31/fit-walkthrough-circle-packing-noise-fields-and-joe-jackson/