Crates.io | triangulation |
lib.rs | triangulation |
version | 0.1.1 |
source | src |
created_at | 2019-01-25 18:19:14.036529 |
updated_at | 2019-01-27 15:36:20.7949 |
description | A collection of triangulation algorithms |
homepage | |
repository | https://gitlab.com/LeshaInc/triangulation |
max_upload_size | |
id | 110650 |
size | 189,020 |
Rust port of delaunator.
WASM based browser demo. See wasm-demo/
folder.
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]);
Tests performed on Intel Core i5-2500 CPU @ 3.30GHz x 4
This project is licensed like the Rust language itself under either of
LICENSE-APACHE
file
or http://www.apache.org/licenses/LICENSE-2.0)LICENSE-MIT
file
or https://opensource.org/licenses/MIT)at your option.