Here's what I have (arbitrarily sorted points):
Here's what I want (Indices sorted following a circle):
I would like to be able to have any number of points at any distance/angle from the center sorted as if they were part of a circle. Here's what I tried:
-a few things with convex hull, but the results seemed to be completely random every time.
-adding a mesh circle having the same number of points as the input and projecting it on the given points using geometry proximity node, but that doesn't work when the points are not distributed evenly, so many points from the circle get projected on the same point sometimes.
Here's what I think might work:
-taking one of the edges as a starting point and comparing the angles of every next edge with it, then sorting them from smallest angle to the biggest angle, and thus changing the indices accordingly. this could be done with python but I just couldn't get it to work on geometry nodes. any help will be much appreciated!