#delaunay #geometry #point #collection

triangulation

A collection of triangulation algorithms

2 releases

0.1.1 Jan 27, 2019
0.1.0 Jan 25, 2019

#2522 in Algorithms

Download history 23/week @ 2024-03-11 22/week @ 2024-03-18 32/week @ 2024-03-25 76/week @ 2024-04-01 10/week @ 2024-04-08 22/week @ 2024-04-15 29/week @ 2024-04-22 10/week @ 2024-04-29 42/week @ 2024-05-06 26/week @ 2024-05-13 16/week @ 2024-05-20 26/week @ 2024-05-27 15/week @ 2024-06-03 15/week @ 2024-06-10 10/week @ 2024-06-17 19/week @ 2024-06-24

60 downloads per month
Used in 6 crates (via density-mesh-core)

MIT/Apache

140KB
607 lines

Rust port of delaunator.

Demo

WASM based browser demo. See wasm-demo/ folder.

Documentation

Example

use triangulation::{Delaunay, Point};

let points = vec![
    Point::new(10.0, 10.0),
    Point::new(100.0, 20.0),
    Point::new(60.0, 120.0),
    Point::new(80.0, 100.0)
];

let triangulation = Delaunay::new(&points).unwrap();
assert_eq!(&triangulation.triangles, &[3, 0, 2, 3, 1, 0]);

Performance

plot

Tests performed on Intel Core i5-2500 CPU @ 3.30GHz x 4

License

This project is licensed like the Rust language itself under either of

at your option.

Dependencies