Pattern generation with a minimal distance

Do you see how this code works? It proceeds sequentially through the list of rectangles and removes any other rectangles that collide with the one being examined.

This means that with the same set of random rectangles (no changes in the white group), you can get a different result by jittering the list sequence (yellow group added) prior to the Anemone loop.


cull_rectangles_2020Sep23a.gh (28.3 KB)

1 Like

Thanks for the addition. It is great!

I decided this old code needed an update. Added ‘Define Region, Cull Intersecting Rectangles’ (cyan group) to define a boundary and cull any rectangles that intersect it. In reality, the boundary can be any shape and orientation. (circle, diamond, zig-zag polyline, etc.)

Replaced ‘Classic’ Anemone loop with ‘Fast’, added Data Dam to make adjustments easier.

Beyond the boundary, there are eight parameters that affect the pattern of rectangles including two sliders in blue groups, Jitter ‘Seed’ and ‘min_sep’.


cull_rectangles_2023Mar5a.gh (31.2 KB)