Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spherical-triangulation

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spherical-triangulation

Maintain a spherical triangulation under incremental vertex insertions

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

spherical-triangulation

Maintains a spherical triangulation under incremental vertex insertions. This module is meant to be used internally for various convex hull implementations.

This module should work for spheres in any dimension > 1, though it is probably quite slow once you get past 4D spheres.

All computations are performed using adaptive/exact arithmetic.

Example

var createTriangulation = require("spherical-triangulation")

var st = createTriangulation([
  [1,0,0],
  [0,1,0],
  [0,0,1],
  [-1,-1,-1]
])

st.insert([1,1,0])
st.insert([0,1,1])
st.insert([1,0,1])

Install

npm install spherical-triangulation

API

var createTriangulation = require("spherical-triangulation")

var st = createTriangulation(simplex)

Creates an initial spherical triangulation from a simplex

  • simplex is an array of points encoding a simplex

Returns A new spherical triangulation object

st.insert(point)

Inserts a point into a spherical triangulation

  • point is the point which is being inserted

st.locate(point)

Locates a point in the triangulation

  • point is a test point

Returns The cell containing point

st.points

The list of all points in the cell complex

st.cells

An array of all the cells in the complex. Cells are all positively oriented according to the convention used in robust-orientation.

Credits

(c) 2014 Mikola Lysenko. MIT License

Keywords

FAQs

Package last updated on 15 May 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