D-dimensional Delaunay triangulations in Rust, inspired by CGAL.
This library implements d-dimensional Delaunay triangulations in Rust. It is inspired by CGAL, which is a C++ library for computational geometry, and Spade, a Rust library that implements 2D Delaunay triangulations, Constrained Delaunay triangulations, and Voronoi diagrams. The goal of this library is to provide a lightweight alternative to CGAL for the Rust ecosystem.
- Arbitrary data types associated with vertices and cells
- d-dimensional Delaunay triangulations
- d-dimensional Convex hulls
- Serialization/Deserialization of all data structures to/from JSON
- Tested for 3-, 4-, and 5-dimensional triangulations
See CHANGELOG.md for details.
This crate was originally maintained at https://github.com/oovm/shape-rs through version 0.1.0
.
The original implementation provided basic Delaunay triangulation functionality.
Starting with version 0.3.4
, maintenance transferred to this repository, which hosts a completely
rewritten d-dimensional implementation focused on computational geometry research applications.
- 📚 Docs for old versions (≤ 0.1.0): https://docs.rs/delaunay/0.1.0/delaunay/
- 📚 Docs for current version (≥ 0.3.4): https://docs.rs/delaunay
We welcome contributions! Here's a 30-second quickstart:
# Clone and setup
git clone https://github.com/acgetchell/delaunay.git
cd delaunay
# Build and test
cargo build
cargo test
# Format and lint
cargo fmt --all
cargo clippy --all-targets --all-features
# Run examples
./scripts/run_all_examples.sh
# Run a specific example
cargo run --example triangulation_3d_50_points
cargo run --example convex_hull_3d_50_points
cargo run --example into_from_conversions
cargo run --example point_comparison_and_hashing
The examples/
directory contains several demonstrations:
triangulation_3d_50_points
: Complete 3D Delaunay triangulation with 50 random pointsconvex_hull_3d_50_points
: 3D convex hull extraction and analysis with performance benchmarksinto_from_conversions
: Demonstrates Into/From trait conversions and utilitiespoint_comparison_and_hashing
: Demonstrates point comparison and hashing behavior
For comprehensive guidelines on development environment setup, testing, benchmarking, performance analysis, and development workflow, please see CONTRIBUTING.md.
This includes information about:
- Building and testing the library
- Running benchmarks and performance analysis
- Code style and standards
- Submitting changes and pull requests
- Project structure and development tools
For a comprehensive list of academic references and bibliographic citations used throughout the library, see REFERENCES.md.