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

edge-split

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edge-split

Iteratively split edges to get a more uniform tessellation

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
69
increased by81.58%
Maintainers
1
Weekly downloads
 
Created
Source

edge-split

experimental

Mesh refinement via edge-splitting. Does not change the surface normals. This package is useful if you want to refine your tessellation in order to more finely sample some field, but still preserve sharp corners in your mesh.

Usage

NPM

var bunny          = require('bunny')
var split          = require('./index');
var refined        = split(bunny.positions, bunny.cells, 0.01, 1000);
console.log(refined) # <- {positions: [[0.5,0.2,0.1], ...], cells: [[0,1,2],...]}

require("edge-split")(cells, positions[, edgeThreshold, maxIterations])

This returns a simplicial complex that has maximum edge length less than edgeThreshold. By default, edgeThreshold is set to the mean edge length. By default it will split indefinitely, which can be customized by the maxIterations argument. Note: this function modifies cells and positions in-place, so create a copy before using if needed.

Contributing

See stackgl/contributing for details.

License

MIT. See LICENSE.md for details.

Keywords

FAQs

Package last updated on 03 Aug 2017

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