convex_hull

compas.geometry.convex_hull(points)[source]

Construct convex hull for a set of points.

Parameters:
pointssequence[point]

A sequence of XYZ coordinates.

Returns:
list[[int, int, int]]

The triangular faces of the convex hull as lists of vertex indices referring to the original point coordinates.

See also

convex_hull_xy

Notes

This algorithm is based on [1]. Note that is not optimized and relatively slow on large sets of points. For a more optimized version of this algorithm, see [2].

References

[2]

Thomas Diewald. Convex Hull 3D - Quickhull Algorithm. Available at: https://web.archive.org/web/20180106161310/http://thomasdiewald.com/blog/?p=1888