Skip to main content

get-bounding-hull

function getBoundingHull(ps: number[][], includeRedundantPoints: boolean): number[][] | undefined

Defined in global-properties/bounds/get-bounding-hull.ts:19

Finds the convex hull of the given set of 2d points using the
Graham Scan algorithm and returns the hull as an array of points.

exact: this algorithm is robust via adaptive infinite precision floating point arithmetic.

Parameters:

NameTypeDescription
psnumber[][]a set of points, e.g. a bezier curve, e.g. [[0,0],[1,1],[2,1],[2,0]]
includeRedundantPointsboolean