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.

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.