Counterclockwise selection from top to bottom

Greetings everyone,

I am currently working on a project involving a complex polysurface consisting of hundreds of individual components. The polysurface is made up of a simple array of boxes, arranged in a C-Type pattern measuring 50 units by 50 units. I am looking to create a selector that moves from top to bottom, or vice versa, in a counter-clockwise direction across the boxes, applying a “jitter” selection along the way.

Specifically, I would like the selector to start at the top right corner of the C shape and move in a counter-clockwise direction towards the bottom right corner of the C shape. I have been experimenting with various methods and components in Grasshopper, but have not been able to achieve the desired result thus far.

If anyone has any insights or suggestions on how to create such a selector, I would greatly appreciate your help. Thank you in advance for your assistance.

Can you upload a grasshopper file and provide a sketch of what your goal is?

-Kevin

Hi Kevin, thank you for your response. I have attached the files now wih a graphic to explain the start “S” of the selection process and the “F” of the completion of selection in a counter-clockwise manner.

GH Random.3dm (437.6 KB)
GH Random.gh (12.3 KB)

t

Hello,

The first thing that comes to mind is to build a guide curve and use Sort Along Curve.
The general behaviour is here, but since all boxes are aligned on a grid, it often jumps between rows in a non-regular way. Do you need something more accurate ? (which would require another sorting rule).

GH Random.gh (19.8 KB)

1 Like

Another way might be to use polar coordinates and sort the the Phi/Planar Angle of each point from the center of all the geometries


GH Random_GL.gh (23.0 KB)

I am sorry for the late reply, but I would like to thank you all for the help on this. Much appreciated!!