Voronoice
一种构建用Rust编写的2D 好方法。
Voronoice首先通过真正快速的板条箱获取,然后提取其双重Voronoi图,从而构建Voronoi图。
例
use voronoice :: * ;
// voronoi sites
let sites = vec! [
Point { x: 0.0 , y: 0.0 }, Point { x: 1.0 , y: 0.0 }, Point { x: 0.0 , y: 1.0 }
];
// builds a voronoi diagram from the set of sites above, bounded by a square of size 4
let my_voronoi = VoronoiBuilder :: default ()
. set_sites (sites)
. set_b