资源说明:Delaunator
一个非常快JavaScript库,用于2D点的。
基于Delaunator的项目
用于Voronoi图,搜索,遍历和渲染( 的一部分)。
用于球体上的Delaunay三角剖分和Voronoi图(例如,地理位置)。
移植到其他语言
(Rust)
(Go)
(C ++)
(C#)
(Ruby)
(Python)
(Haxe)
例
const points = [ [ 168 , 180 ] , [ 168 , 178 ] , [ 168 , 179 ] , [ 168 , 181 ] , [ 168 , 183 ] , ... ] ;
const delaunay = Delaunator . from ( points ) ;
console . log ( delaunay . triangles ) ;
// [623, 636, 619, 636, 444, 619, ...]
安装
使用NPM( npm install delaunator )或Yarn( yarn add delaunator )安装,然后:
// impo
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。