Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
incremental-delaunay
Advanced tools
Incremental Delaunay triangulation data structure.
Warning This module has problems in >3D. For those cases you should use delaunay-triangulate instead.
var createTriangulation = require("incremental-delaunay")
//Create a 2D triangulation with some points
var triangulation = createTriangulation(2, [
[0,1],
[1,0],
[1,1]
])
//Insert some random point
triangulation.insert([1, 2])
//Get all points in the triangulation
console.log("points=", triangulation.points)
//Get all cells in the triangulation
console.log("cells=", triangulation.cells)
//Locate a triangle containing a point
console.log("located triangle=", triangulation.locate([0.5, 0.5]))
Example output:
points= [ [ -1e+30, -1e+30 ],
[ 1e+30, -1e+30 ],
[ 0, 1e+30 ],
[ 0, 1 ],
[ 1, 0 ],
[ 1, 1 ],
[ 1, 2 ] ]
cells= [ [ 5, 6, 3 ],
[ 3, 6, 2 ],
[ 6, 1, 2 ],
[ 5, 1, 6 ],
[ 4, 5, 3 ],
[ 4, 1, 5 ],
[ 3, 0, 4 ],
[ 0, 1, 4 ],
[ 0, 3, 2 ] ]
located triangle= [ 3, 0, 4 ]
var createTriangulation = require("incremental-delaunay")
var triangulation = createTriangulation(dimension, points)
Creates a triangulation
dimension
is the dimension of the ambient spacepoints
is an array of pointsReturns A DelaunayTriangulation
object
triangulation.cells
An array of all cells in the triangulation
triangulation.points
An array of all points in the triangulation
triangulation.insert(point)
Adds point
to the triangulation
triangulation.locate(point)
Returns the simplex containing point
(c) 2013-2014 Mikola Lysenko. MIT License
FAQs
Incremental Delaunay triangulation
The npm package incremental-delaunay receives a total of 4 weekly downloads. As such, incremental-delaunay popularity was classified as not popular.
We found that incremental-delaunay demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.