Hi All, please help to share the script to make the grid like this.
I am new in Grosshopper,
Thank you
You have two options that make sense to me:
- Start with a Square or Rectangular regular grid and deform it in a non-linear way to achieve the different column widths.
- Start by generating the column widths as a list of numbers and then make the grid from scratch.
How do the column widths change across the grid? Is it linear, exponential, …?
Edit: I see, the four constraints you specified do make it rather difficult. Total width = 100, first column = 5, last column = 2, column count = integer.
So here’s a problem, if your columns change their width in a roughly linear manner, you cannot reach 100 exactly: variable grid.gh (18.9 KB)
The nearest widths which are possible are 98 (with 28 columns) and 101.5 (with 29 columns).
So you’re going to have to settle for a non-linear shrinking function, which means you suddenly have lots and lots of choices you need to make, because there’s so many different ways of being non-linear.
Here I’m performing a tiny non-linear manual adjustment to the columns to try and get the total width close to 100. It all depends on what sort of tweaking you’re okay with and what sort of tolerances you’re after. There are ways to get to pretty tight tolerances using Galapagos or some other iterative method.
Hi David, I think the second way is better for me, the tolerance is ok and the column widths change across the grid is linear. i will try this way. thank you so much for your helps.