cpConvexHull

Calculate the convex hull of a given set of points. Returns the count of points in the hull. @c result must be a pointer to a @c cpVect array with at least @c count elements. If @c result is @c NULL, then @c verts will be reduced instead. @c first is an optional pointer to an integer to store where the first vertex in the hull came from (i.e. vertsfirst == result[0]) @c tol is the allowed amount to shrink the hull when simplifying it. A tolerance of 0.0 creates an exact hull. QuickHull seemed like a neat algorithm, and efficient-ish for large input sets. My implementation performs an in place reduction using the result array as scratch space.

int
cpConvexHull

Meta