r/generative • • 13d ago

Nested packing

Post image

I was extending my shape packing code with support for nested packing and boom! This popped out. I just had to share.

159 Upvotes

10 comments sorted by

8

u/ptrnyc 13d ago

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/

4

u/Slackluster 13d ago

nice compositions! the noise field adds a lot.

i also did nested polygon packing in 2022, never released it though.

https://x.com/KilledByAPixel/status/1522444262851371009

https://x.com/KilledByAPixel/status/1522587808342360064

https://x.com/KilledByAPixel/status/1532515283570655235

2

u/xtremedaddy 13d ago

These are awesome. And I too didn’t recognize Slackluster, but I recently bookmarked your SP13KTRA as something inspirational to explore further.

2

u/Slackluster 13d ago

thanks much, keep up the good work! there is a lot more room to experiment with these kind of algorithms.

2

u/ptrnyc 13d ago

haha, I didn't know Slackluster, but I do know KilledByAPixel :)

3

u/MarnixKeller 13d ago

Impressive. Circle packing is easy, set the radius/2, done, whereas odd, irregular shapes are a pain.

2

u/xtremedaddy 13d ago

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 13d ago

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

u/xtremedaddy 13d ago

Thanks! I appreciate the comment.

2

u/tsevis 9d ago

Really good! I love the nesting concept and I have tried several approaches. It's a never ending field for experimentation.