Trên GitHub, mapbox/delaunator đã đạt 2.6k sao, nhóm Frontend, ngôn ngữ JavaScript. An incredibly fast JavaScript library for Delaunay triangulation of 2D points
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Constructs a delaunay triangulation object given an array of point coordinates of the form:
[x0, y0, x1, y1, ...] (use a typed array for best performance).
Delaunator.from(points[, getX, getY])
Constructs a delaunay triangulation object given an array of points ([x, y] by default).
getX and getY are optional functions of the form (point) => value for custom point formats.
Duplicate points are skipped.
delaunay.triangles
A Uint32Array array of triangle vertex indices (each group of three numbers forms a triangle).
All triangles are directed counterclockwise, assuming the y axis points down (as in screen coordinates); with the y axis pointing up, they are clockwise.
To get the coordinates of all triangles when using Delaunator.from(points), use:
for (let i = 0; i < triangles.length; i += 3) {
coordinates.push([
points[triangles[i]],
points[triangles[i + 1]],
points[triangles[i + 2]]
]);
}
To get the coordinates of all triangles when using new Delaunator(coords), use:
A Int32Array array of triangle half-edge indices that allows you to traverse the triangulation.
i-th half-edge in the array corresponds to vertex triangles[i] the half-edge is coming from.
halfedges[i] is the index of a twin half-edge in an adjacent triangle
(or -1 for outer half-edges on the convex hull).
The flat array-based data structures might be counterintuitive,
but they're one of the key reasons this library is fast.
delaunay.hull
A Uint32Array array of indices that reference points on the convex hull of the input data, counterclockwise (assuming the y axis points down, like triangles).
delaunay.coords
An array of input coordinates in the form [x0, y0, x1, y1, ....],
of the type provided in the constructor (or Float64Array if you used Delaunator.from).
delaunay.update()
Updates the triangulation if you modified delaunay.coords values in place, avoiding expensive memory allocations.
Useful for iterative relaxation algorithms such as Lloyd's.
Performance
Benchmark results against other Delaunay JS libraries
(npm run bench on Macbook Pro Retina 15" 2017, Node v10.10.0):
uniform 100k
gauss 100k
grid 100k
degen 100k
uniform 1 million
gauss 1 million
grid 1 million
degen 1 million
delaunator
82ms
61ms
66ms
25ms
1.07s
950ms
830ms
278ms
faster‑delaunay
473ms
411ms
272ms
68ms
4.27s
4.62s
4.3s
810ms
incremental‑delaunay
547ms
505ms
172ms
528ms
5.9s
6.08s
2.11s
6.09s
d3‑voronoi
972ms
909ms
358ms
720ms
15.04s
13.86s
5.55s
11.13s
delaunay‑fast
3.8s
4s
12.57s
timeout
132s
138s
399s
timeout
delaunay
4.85s
5.73s
15.05s
timeout
156s
178s
326s
timeout
delaunay‑triangulate
2.24s
2.04s
OOM
1.51s
OOM
OOM
OOM
OOM
cdt2d
45s
51s
118s
17s
timeout
timeout
timeout
timeout
Papers
The algorithm is based on ideas from the following papers:
A simple sweep-line Delaunay triangulation algorithm, 2013, Liu Yonghe, Feng Jinming and Shao Yuehong
S-hull: a fast radial sweep-hull routine for Delaunay triangulation, 2010, David Sinclair
A faster circle-sweep Delaunay triangulation algorithm, 2011, Ahmad Biniaz and Gholamhossein Dastghaibyfard
Robustness
Delaunator should produce valid output even on highly degenerate input. It does so by depending on robust-predicates, a modern port of Jonathan Shewchuk's robust geometric predicates, an industry standard in computational geometry.
mapbox/delaunator thuộc nhóm Frontend trên TopGit, cùng 7 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về mapbox/delaunator ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/mapbox/delaunator là nguồn chính thức.
mapbox/delaunator có bao nhiêu sao?
mapbox/delaunator có 2.6k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/mapbox/delaunator. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
mapbox/delaunator có phải mã nguồn mở không?
Có — mapbox/delaunator phát hành theo license ISC, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/mapbox/delaunator.
mapbox/delaunator còn đang phát triển không?
Commit gần nhất trên mapbox/delaunator là 4 tháng trước (theo timestamp GitHub). Repo có 156 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
mapbox/delaunator dùng license gì?
mapbox/delaunator phát hành theo license ISC. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
mapbox/delaunator là gì?
mapbox/delaunator (mapbox/delaunator) là dự án JavaScript trên GitHub. Theo mô tả gốc: An incredibly fast JavaScript library for Delaunay triangulation of 2D points
mapbox/delaunator viết bằng ngôn ngữ gì?
mapbox/delaunator chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về delaunator?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về delaunator.