algorithmic modeling for Rhino
Well ... this is a typical case that requires a concave hull algo (not convex).
1. The "classic" (using SphereFit and PlaneFit and then the circle as sorting curve) fails for more than obvious reasons. BTW: if you use a sorting curve from a convex hull ... sorting also fails.
2. The also "classic" (Sort by angle using a focus point [variable for fun or the centroid]) also fails for different reasons:
3. The concave hull never fails (but unfortunately the C# is classified as strictly internal):
Here's the approach I usually use to sort points radially around a center (using GHPython and RhinoCommon). Similar to a couple of the other suggestions.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by