voronator 0.2.1

Implements the Voronoi diagram construction as a dual of the Delaunay triangulation for a set of points and the construction of a centroidal tesselation of a Delaunay triangulation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
extern crate voronator;

use voronator::delaunator;
use voronator::delaunator::Point;

fn main() {
    let coords = vec![(0., 0.), (1., 0.), (1., 1.), (0., 1.)];
    let (triangulation, _) = delaunator::triangulate_from_tuple::<Point>(&coords).unwrap();

    println!(
        "Triangulated  {} points, generating {} triangles.",
        coords.len(),
        triangulation.triangles.len() / 3
    );
}