Skip to content

Consistently orient connected components of a simplicial complex

License

Notifications You must be signed in to change notification settings

ataber/consistently-orient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

consistently-orient

experimental

Depth-first traversal through 2D simplicial complex to consistently orient cells (and potentially fail with information about orientability).

Usage

NPM

var bunny          = require('bunny')
var flippedCount   = orient(bunny.cells);

// possible further global checks: volume (as follows) or raytracing
if (require('mesh-mass')(bunny.cells, bunny.positions).volume < 0) {
  // volume is negative, implying the global orientation must be flipped
}

require("consistently-orient")(cells)

Modifies cells in-place. Splits the complex into components defined by manifold connectivity (i.e. two cells are neighbors iff they share a manifold edge), and for each component attempts to consistently orient cells. Note that we choose the desired orientation arbitrarily, so a further global check is required if you need additional guarantees such as outward-facing normals.

In the case of non-orientability (determined by reaching a contradiction while propagating orientation), raises an error.

The method we use for finding manifold patches is derived from this reference.

Contributing

See stackgl/contributing for details.

License

MIT. See LICENSE.md for details.

About

Consistently orient connected components of a simplicial complex

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published