I'm having trouble sorting a group of randomly ordered points that lie on a circle. I don't care if they're ordered clockwise/counter clockwise or which point is 0 - I just need the point numbers to increase as you walk around the circle (without changing their positions).
I've tried a handful of approaches using some math (dot product, etc), but my main issue is that the sort SOP can't actually access the point number or point position in its expression fields.
Any ideas? Attached is a screen of the points I need to sort
How to sort points on a circle?
13739 5 3-
- KMcNamara
- Member
- 228 posts
- Joined: Dec. 2012
- Offline
-
- malexander
- Staff
- 5224 posts
- Joined: July 2005
- Offline
-
- KMcNamara
- Member
- 228 posts
- Joined: Dec. 2012
- Offline
Hey, thanks for the reply. Unfortunately I need to keep my points exactly where they are - as you can see they are not evenly spaced and that approach would alter the position of my points. Further, since this is part of a procedural system, they may be very unevenly spaced. They will always, however, lie on a circle and I will always have the center point and radius of that circle.
Any other ideas? Thanks again for the reply
Any other ideas? Thanks again for the reply
-
- tjeeds
- Member
- 339 posts
- Joined: Aug. 2007
- Offline
-
- animatrix_
- Member
- 4769 posts
- Joined: Feb. 2012
- Offline
If the normal of the plane your points are on is Y (XZ plane), then assuming they are already centered around the origin, you can use this expression in the Sort SOP:
atan2($TZ, $TX)
atan2($TZ, $TX)
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
-
- KMcNamara
- Member
- 228 posts
- Joined: Dec. 2012
- Offline
-
- Quick Links