qhull-rs
Safe Rust Qhull bindings
Qhull computes the convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, furthest-site Delaunay triangulation, and furthest-site Voronoi diagram. The source code runs in 2-d, 3-d, 4-d, and higher dimensions. Qhull implements the Quickhull algorithm for computing the convex hull. It handles roundoff errors from floating point arithmetic. It computes volumes, surface areas, and approximations to the convex hull.
Qhull does not support triangulation of non-convex surfaces, mesh generation of non-convex objects, medium-sized inputs in 9-D and higher, alpha shapes, weighted Voronoi diagrams, Voronoi volumes, or constrained Delaunay triangulations.
- Qhull main page (retrieved 2024-09-02)
Quick start
Binaries
qhull-rs provides some binary targets from the original Qhull source code:
qconvexqdelaunayqhalfqhullqvoronoirbox
To get them:
Usage
Add this to your Cargo.toml:
= "0.3"
For the current development version:
[]
= { = "https://github.com/LucaCiucci/qhull-rs" }
Example
A 2D convex hull:
use Qh;
let qh = builder
.compute
.build_from_iter.unwrap;
for simplex in qh.simplices
See the [examples] module/folder for more examples.
License
This crate uses Qhull, please refer to the Qhull license for more information when using this crate.