I found somewhere in this forum how to sort the point list in order, but I can’t remember.
Could you explain the contents of this algorithm?
Takes a list of points and:
- Generates a plane by best fit through them
- Pulls the origin from the plane. This should be the geometric mean of the point list.
- Builds a vector from the plane origin to each point.
- Finds the X axis and normal of the plane.
- Gets the angle from the X axis to the point vectors around the normal.
- Sorts the list of points according the the angle values.
- Generates a polygon from the sorted points.
1 Like