Extract all unique triangle vertices from a convex or concave polygon.