4 releases

Uses old Rust 2015

0.2.1 Jun 10, 2021
0.2.0 Sep 15, 2018
0.1.1 Sep 14, 2018
0.1.0 Sep 14, 2018

#95 in Algorithms

Download history 242/week @ 2021-02-25 189/week @ 2021-03-04 124/week @ 2021-03-11 263/week @ 2021-03-18 272/week @ 2021-03-25 366/week @ 2021-04-01 461/week @ 2021-04-08 323/week @ 2021-04-15 274/week @ 2021-04-22 143/week @ 2021-04-29 302/week @ 2021-05-06 258/week @ 2021-05-13 228/week @ 2021-05-20 580/week @ 2021-05-27 281/week @ 2021-06-03 264/week @ 2021-06-10

1,284 downloads per month
Used in 2 crates

ISC license

32KB
367 lines

delaunator-rs

A very fast static 2D Delaunay triangulation library for Rust. A port of Delaunator.

delaunator on Crates.io Build Status

Documentation

Example

use delaunator::{Point, triangulate};

let points = vec![
    Point { x: 0., y: 0. },
    Point { x: 1., y: 0. },
    Point { x: 1., y: 1. },
    Point { x: 0., y: 1. },
];

let result = triangulate(&points).expect("No triangulation exists.");

println!("{:?}", result.triangles); // [0, 2, 1, 0, 3, 2]

Performance

Results for 3.1 GHz Intel Core i7 on a Macbook Pro 15'' (2017):

points time
100 16.478µs
1,000 277.64µs
10,000 3.753ms
100,000 63.627ms
1,000,000 898.78ms
10,000,000 11.857s

No runtime deps