False grid packing / Rectangular uneven subdivision

This is a minor follow-up to a post I saw on the old grasshopper forum, based on the concept of filling a user-designated grid with randomly placed rectangles:

https://www.grasshopper3d.com/forum/topics/rectangle-false-packing-sample-and-example?overrideMobileRedirect=1

I have modified the original file, labelled “test_unveven_subdivision.gh” by the original author, into a version with better randomization. I did this because I realized that if the grid was run at the same size multiple times in a row, it would use the same result, as the randomizers were run on a counter that reset every time you ran the code.
This version uses a clock function to alter the seed of the randomizers that you can alter at your leisure.

Uneven Subdivision Altered.gh (25.4 KB)

Here is an example of a couple random patterns made using the file:
Screenshot 2024-09-17 214826

I will also be replying to a follow up post on this site from the original creator, Laurent Delrieu, where they’ve updated their latest version of the pattern maker rather than the original that I altered, so check them out, they’re the one who knows more about the program than I do.

2 Likes

Get a the orthodox way to cut the mustard on that matter. Using classic Matrix related stuff.

You can get either the modules or the “union” - so to speak. If a Surface is present you can do it on that as well (but the union in a Surface is an internal option).

Controlled_unevenSurfDiv_V1A_Public.gh (131.0 KB)

2 Likes

Hello Peter
I did a bit the same here.

1 Like

This is super neat…how do I set the number of colors/variants?

1 Like

I think I used Color Wheel, this component as Input accept an integer (number of colors) and output colors. So you could have a color for each area, you get the number of area by using Sets.

1 Like