This sketch uses a flow field to place and rotate rectangles. Each rectangle is checked for collisions before placement, so in theory they should either be in free space or fully contained within another rectangle. However, as I’m writing this I see that I have a bug which sometimes allows shapes to span multiple “parent” shapes. Gonna have to track that down.

Tyler Hobbs has a good intro to flow fields if you want to learn more.

<< go back • for a new image • get the code