Manual

API Reference

Quickhull.quickhullFunction
quickhull(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.

source
Quickhull.quickhull_parallelFunction
quickhull_parallel(points, options=Quickhull.Options())

Convenience function for running quickhull with the parallel subdivision option enabled.

source
Quickhull.delaunayFunction
delaunay(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.

source
Quickhull.OptionsType
Quickhull.Options(options...)

Avaliable options are:

  • kernel – a subtype of HyperplaneKernel used for hyperplane calculations. HyperplaneKernelExactSIMD by default.
  • indextype – a subtype of Integer that specifies how vertex indices should be stored. Int32 by default.
  • joggle – whether to joggle the input points. false by default
  • joggle_amount – how much to joggle the input points. 100.0 by default.
  • statistics – whether to record statistics. false by 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 into nchunks many chunks, nlevels many times recursively. Not parallel.
    • ParallelSubdivide(chunks=nchunks, levels=nlevels) – subdivide points into nchunks many chunks, nlevels many times recursively. Sub-hulls are computed in parallel.
source
Quickhull.pointsMethod
points(hull)

The points the hull was constructed from. This includes points inside the hull - see vertices(hull) and vertexpoints(hull).

source
Base.inMethod
in(pt, hull)

Determine if a point is inside (or on the boundary) of the hull.

source
Base.insert!Method
insert!(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.

source
GeometryBasics.MeshMethod
GeometryBasics.Mesh(hull::Quickhull.AbstractHull)

Create a Mesh from the points and facets of hull.

source

Voronoi Utilities

Quickhull.voronoi_edgesFunction
voronoi_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).

source
Quickhull.voronoi_edge_pointsFunction
voronoi_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.

source
Quickhull.voronoi_edge_points_homogeneousFunction
voronoi_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'.

source
Quickhull.voronoi_edge_points_projectedFunction
voronoi_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.

source

Extensions

Quickhull.PolyhedraLibraryFunction
PolyhedraLibrary(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.

source