Gradually sized circles and lines in matrix (based on a sketch)

I have a grasshopper assignment where we need to have a figure move in a matrix in a series of ways to end up looking like a desried sketch.

I have created the figure of the line and the cirlce in the middle of i, however I am finding trouble moving the figure to the edges of the cell and having it move along the edges.

I am trying to evaluate the length of the cells in a way where the top and bottom edges of each cell gets evaluated in distances of 2, in order for me to create a vector to move the line+circle fogure to those points on the edges of the cell.


If the amount of rows and columns are fixed (equal to 6 as in your sketch), you could draw your three patterns inside a square centered around the origin (in RH directly, or in GH), and then use Orient from the origin to the center of gravity of each cell.
Then it’s only a matter of choosing the right pattern, but I think this can be achieved by calculating the distance from the center of your grid to the center of each cell… Or playing with the tree paths (Tree Statistics, Deconstruct Path, Modulus 2…)

Of course if you want to be able to change the amount of rows/columns, this is slightly more complex. I’d Explode those cells, take the first horizontal edge and Divide Curve it in nb_columns+1 segments, these appear to be the positions of the end points.

Have a look at this maybe ?

There is a pattern discrepency in C3 and D3 in your sketch.

Try this exercise with the hints above before looking at the solution ! :smiley: (23.8 KB)

i just have one question. Did u group the line and the circle to beone figure and then moved them ?

I ended up not using that solution, but if you do I don’t think it’s necessary to Group these objects, though it would also work.

I am tryinig to understand something in your script @magicteddy

I understand the branches but i dont understand why there are only 4 items in each branch after you exploded the cells

Can we update the title to something more descriptive?

How about:

Gradually sized circles and lines in matrix?

Each cell is a rectangle. If you explode that curve, it results in 4 line segments.
Beware that the tree structure rises one level up because of that operation.

1 Like