Sorting a grid concentrically

In addition to circles, this method happens to work pretty well with rectangles and polygons too:


rings_2019Jul9c2
rings_2019Jul9c.gh (32.7 KB)

It could use further refinements though… Polygons give an error when radius is zero, which revealed a subtle bug - temporarily fixed with a “!= zero” panel set to 0.01, but that still leaves a tiny “ring” in the center, essentially with zero radius. That’s not right. There are some alignment issues along the edges and points in corners can get assigned to the wrong “ring”, because they are closer to the “wrong one”. Still, some decent GH concepts illustrated here.

As the ‘Tree/List Viewer’ shows, this isn’t just coloring. The points are organized as one branch per ring.

2 Likes