New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

delaunay-fast

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

delaunay-fast

Fast Delaunay Triangulation in JavaScript

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
232
decreased by-3.73%
Maintainers
1
Weekly downloads
 
Created
Source

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.)

Notably, it runs in subquadratic time, making it the fastest JavaScript implementation of which I'm aware. (Okay, it doesn't really, but it'd be trivial to modify to run in subquadratic time, I just havn't done so yet.)

This software is released into the public domain.

Keywords

FAQs

Package last updated on 21 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc