24 stable releases

new 2.7.0 May 17, 2024
2.6.0 Jan 14, 2024
2.5.1 Dec 28, 2023
2.4.0 Nov 19, 2023
0.2.1 Oct 11, 2016

#66 in Data structures

Download history 23124/week @ 2024-01-28 30875/week @ 2024-02-04 41123/week @ 2024-02-11 45161/week @ 2024-02-18 42464/week @ 2024-02-25 41494/week @ 2024-03-03 41022/week @ 2024-03-10 38681/week @ 2024-03-17 29841/week @ 2024-03-24 29119/week @ 2024-03-31 30675/week @ 2024-04-07 30572/week @ 2024-04-14 29730/week @ 2024-04-21 29858/week @ 2024-04-28 30072/week @ 2024-05-05 31767/week @ 2024-05-12

123,446 downloads per month
Used in 149 crates (19 directly)

MIT/Apache

540KB
10K SLoC

Docs Crates.io GitHub Workflow Status (branch)

spade

Delaunay triangulations for the rust ecosystem.

  • 2D Delaunay triangulation, optionally backed by a hierarchy structure for improved nearest neighbor and insertion performance.
  • Allows both incremental and bulk loading creation of triangulations
  • Support for vertex removal
  • 2D constrained Delaunay triangulation (CDT)
  • Delaunay refinement
  • Uses precise geometric predicates to prevent incorrect geometries due to rounding issues
  • Supports extracting the Voronoi diagram
  • Natural neighbor interpolation


Project goals

Project goals, in the order of their importance:

  1. Robustness - all data structures should behave correctly. An incorrect result, even if triggered only under rare circumstances, is not acceptable. This is why Spade uses a precise calculation kernel by default.
  2. Easy to use - favor an easy to use API over an API that exposes all bells and whistles.
  3. Performance - Delaunay triangulations are often a low level component of an application. Optimization in this area pays off greatly.
  4. Small footprint - Spade should be a sensible library to include in your project that doesn't require too many dependencies. Bigger dependencies will be feature gated when possible.

Roadmap

For Spade 3:

  • Possibly API simplification by un-supporting non-f64 outputs.

Performance and comparison to other crates

Refer to the delaunay_compare readme for some benchmarks and a comparison with other crates.

License

Licensed under either of

at your option.

Dependencies

~2.5MB
~34K SLoC