Manual
API Reference
Quickhull.quickhull — Functionquickhull(points, options=Quickhull.Options())Compute the convex hull of points. points can be a vector of point-like objects (e.g. Tuple or StaticVector) or a (D, N)-sized matrix of numbers.
See documentation for Quickhull.Options. Note options is a positional argument, not a keyword argument: quickhull(points, Quickhull.Options(...)) is the correct calling syntax.
Quickhull.quickhull_parallel — Functionquickhull_parallel(points, options=Quickhull.Options())Convenience function for running quickhull with the parallel subdivision option enabled.
Quickhull.delaunay — Functiondelaunay(points, options=Quickhull.Options())Compute the d-dimensional Delaunay triangulation of points. points can be a vector of point-like objects (e.g. Tuple or StaticVector) or a (D, N)-sized matrix of numbers.
The triangulation is found by lifting into d+1 dimensions and taking the convex hull.
Quickhull.Options — TypeQuickhull.Options(options...)Avaliable options are:
kernel– a subtype ofHyperplaneKernelused for hyperplane calculations.HyperplaneKernelExactSIMDby default.indextype– a subtype ofIntegerthat specifies how vertex indices should be stored.Int32by default.joggle– whether to joggle the input points.falseby defaultjoggle_amount– how much to joggle the input points.100.0by default.statistics– whether to record statistics.falseby default.subdivide– controls whether hull is computed by subdividing the input points and merging the resulting sub-hulls. Available options are:NoSubdivide()– don't use subdivision (default).SerialSubdivide(chunks=nchunks, levels=nlevels)– subdivide points intonchunksmany chunks,nlevelsmany times recursively. Not parallel.ParallelSubdivide(chunks=nchunks, levels=nlevels)– subdivide points intonchunksmany chunks,nlevelsmany times recursively. Sub-hulls are computed in parallel.
Quickhull.points — Methodpoints(hull)The points the hull was constructed from. This includes points inside the hull - see vertices(hull) and vertexpoints(hull).
Quickhull.vertices — Methodvertices(hull)The indices of points that are vertices of the hull.
Quickhull.vertexpoints — Methodvertexpoints(hull)The points that are vertices of the hull.
Quickhull.facets — Methodfacets(hull)The facets of the hull. A facet is defined by D vertices.
Base.in — Methodin(pt, hull)Determine if a point is inside (or on the boundary) of the hull.
Base.insert! — Methodinsert!(hull, pt)Insert a new point into the hull. Returns true if the point wasn't already in the hull.
Requires the hull to have been created from a vector of points that supports push! (e.g. this won't work if a matrix of points was used). Performance is O(f) in the number of hull facets, so it may faster to rebuild the hull than to insert many points.
GeometryBasics.Mesh — MethodGeometryBasics.Mesh(hull::Quickhull.AbstractHull)Create a Mesh from the points and facets of hull.
Voronoi Utilities
Quickhull.voronoi_centers — Functionvoronoi_centers(delaunay_hull)The circumcenters of a Delaunay triangulation's faces.
Quickhull.voronoi_edges — Functionvoronoi_edges(delaunay_hull)Return a vector of edges that form the Voronoi diagram (excluding rays). Each edge is a tuple (v1, v2) of point indices into voronoi_centers(delaunay_hull).
Quickhull.voronoi_edge_points — Functionvoronoi_edges_points(delaunay_hull)Return a vector of edges that form the Voronoi diagram (excluding rays). Each edge is a tuple (p1, p2) of line segment endpoints.
Quickhull.voronoi_edge_points_homogeneous — Functionvoronoi_edge_points_homogeneous(delaunay_hull)Return a vector of edges that form the Voronoi diagram (including rays). Each edge is a tuple (p1, p2) of line segment endpoints in homogeneous coordinates. This means an extra coordinate has been added to the end of each point: if the coordinate is 1 the point is a 'normal' point, and if the coordinate is 0 the point is 'at infinity'.
Quickhull.voronoi_edge_points_projected — Functionvoronoi_edge_points_projected(delaunay_hull, raylength=1)Return a vector of edges that form the Voronoi diagram (including rays). Each edge is a tuple (p1, p2) of line segment endpoints. Rays are projected out to be length raylength.
Extensions
Quickhull.PolyhedraLibrary — FunctionPolyhedraLibrary(solver)Create an instance of a Polyhedra.Library with the given solver that uses quickhull as a backend. Requires the Polyhedra package to be loaded.