/** * Alpha shape (2-D) — a consumer of the Delaunay triangulation. * * An alpha shape generalises the convex hull: it keeps only the Delaunay * triangles whose circumradius is `≤ 1/alpha`, then returns the boundary of * that region (edges belonging to exactly one kept triangle). Large `alpha` * hugs the point set tightly; `alpha → 0` recovers the convex hull. With the * right `alpha`, an annulus-shaped point cloud yields a shape with a hole. * * Pinned on a known shape (annulus → recovers the hole: two boundary loops) in * `functions/tests/geometry-consumers-oracle.test.ts`. * * @packageDocumentation */ /** Structured alpha-shape result. */ export interface AlphaShapeResult { /** Kept Delaunay triangles (circumradius ≤ 1/alpha), as index triples. */ triangles: number[][]; /** * Boundary edges of the alpha shape — the edges that belong to exactly one * kept triangle — as index pairs `[i, j]` with `i < j`. */ edges: number[][]; } /** * Alpha shape of a set of 2-D points. * * @param points - Array of `[x, y]` points (at least 3, not all collinear). * @param alpha - Positive alpha parameter; triangles with circumradius `≤ 1/alpha` * are kept. Smaller `alpha` → looser shape (→ convex hull); larger `alpha` → * tighter shape that can open holes/concavities. * @returns An {@link AlphaShapeResult} (kept triangles + boundary edges). * @throws When given fewer than 3 points, a non-2-D point set, or `alpha ≤ 0`. */ export declare function alphaShape(points: number[][], alpha: number): AlphaShapeResult; //# sourceMappingURL=alpha-shape.d.ts.map