convex_hull

compas.geometry.convex_hull(points)[source]

Construct convex hull for a set of points.

Parameters

points (list) – A sequence of XYZ coordinates.

Returns

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

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

1

GitHubGist. Convex Hull. Available at: https://gist.github.com/anonymous/5184ba0bcab21d3dd19781efd3aae543

2

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

Examples

>>>