Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

delaunay-fast

> 编程语言
Open source

Fast Delaunay Triangulation in JavaScript.

778 stars0 likes2 views
WebsiteGitHub

About

Fast Delaunay Triangulation in JavaScript.

This is just a quick little implementation of Delaunay Triangulation in JavaScript. It was mostly ported from Paul Bourke's C implementation, but I referenced some bits from another JavaScript implementation and rewrote a bunch of things in ways more amenable to fast JavaScript execution.

Essentially, you pass Delaunay.triangulate a list of vertices (which should be a bunch of two-element arrays, representing 2D Euclidean points), and it will return you a giant array, arranged in triplets, representing triangles by indices into the passed array. (This representation is a little bizarre, but object allocation is too slow for this library's original use case. Yes, really.)

Beware of using vertices that are too close to each other (say, within 0.01 on either axis): numerical precision issues may result, causing your mesh to be invalid. (If you encounter this, simply multiply each of your vertices' positions by a constant factor.)

License

To the extent possible by law, I have waived all copyright and related or neighboring rights to this library.

Related

  • @yahiko00 has released a TypeScript interface that may be useful if you are trying to access this library from TypeScript.

Issues· 1 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言