Skip to content

Convex hulls for 2D and 3D in Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Jondolf/quickhull-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quickhull

A Rust implementation of the Quickhull algorithm for computing convex hulls for 2D and 3D point sets.

The 3D algorithm was adapted from chull, focusing on making it more robust, idiomatic, and efficient.

The Utah teapot and its convex hull

The Utah teapot and its convex hull

3D Example

use glam::DVec3;
use quickhull::ConvexHull3d;

let points = vec![
    DVec3::new(0.0, 0.0, 0.0),
    DVec3::new(1.0, 0.0, 0.0),
    DVec3::new(0.0, 1.0, 0.0),
    DVec3::new(0.0, 0.0, 1.0),
];

// No limit on the number of iterations.
let max_iter = None;

// Compute the convex hull.
let hull = ConvexHull3d::try_from_points(&points, max_iter).unwrap();

// Get the vertices and indices of the convex hull.
let (vertices, indices) = hull.vertices_indices();

References

License

This Quickhull crate is free and open source. All code in this repository is dual-licensed under either:

at your option.

About

Convex hulls for 2D and 3D in Rust

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Languages