Creating random rectangles based on a grid

hi everyone please i need help with creating random sized rectangles based on a grid,that are all contained inside a bigger rectangle!something like this !

Hello
Just search on the forum and you will find what you want.
Use keyword like rectangle packing

is it available based on a grid? on forum?

Yes I made some of the tools. I will gave you some links.
But you could also use a tool like google with a search like that
Site:discourse.mcneel.com packing rectangle
And if you choose image you will see the results you want

wonderful ty sm,but this is extremly complicated is there any easier way to do this? a less complicated version? thank you sir!!

If you think this is extremly complex


I am speechless

So good luck.

1 Like

no sir please,i checked this one out i found it pretty complicated for me,im not advanced in grasshopper,im just asking if theres any simpler way to do this,unfortuantely i dont understand c sharp :frowning: please can you help me?

You don’t need to understand C# to use it ? Upload the example, and try to change the inputs values that’s all.

im not trying to just use , i want to understand it too ? thats why i said that the one i sent is complicated

The logic is this, min value of rectangle width and height must be 1 unit square.

Take a random point in the grid
take a random value for the length of rectangle
take a random value for the height of rectangle
Try if it fits at the random point
If OK draw a rectangle
Do until everything is painted

can you do this for me using grasshopper components please? because i still didnt really get it completly i have been trying for hours thank you so miuch !

It is there