Loop array

Hello,
I want to make an array of these squares in a spiral. Here is the definition for this loop. But it has some errors and doesn’t work correctly. Any idea about how to fix it?

Thank you all

Loop crv.gh (19.2 KB)

Have a look at this:

1 Like

Thanks but it is different I think. I am not asking about the sorting, I want to generate these spiral of squares.

Have you downloaded the def and gone through it? Yes, he’s sorting, but sorting to create a spiral of rectangles out of a rectangular grid.

1 Like

Here is the same logic used by Erick Vásquez, in the link from Ethan Gross, applied to your approximate geometry.

SquareSpiral.gh (14.5 KB)

3 Likes

Thank you, but I want it to work in a loop (using anemone plugin) so that it starts with one square and puts another beside it. Finally, it fills a boundary in a spiral way.

I may be missing something, but this essentially does the same thing. Just use the last slider on the right to add more rectangles to the spiral.

Yeah, thank you very much.

Just one more point. In your definition a rectangular array of the squares is first defined and then it just presents it through the last slider. How if we don’t make if from the first, and just let the algorithm to place the shapes next to each other? It is what I wanted it to do.