simplicial-dijsoint-union
Computes the disjoint union of two simplicial complexes. You can use this to do stuff like concatenate meshes.
Install
npm install simplicial-disjoint-union
Usage
var disjointUnion = //Example://// Combine a bunny and teapot into a single mesh// //First read in meshesvar bunny = teapot = //Then combine positionsvar combinedPos = bunnypositions //Finally combine cells using simplicial-disjoint-unionvar combinedCells =
require("simplicial-disjoint-union")(a, b[, a_verts])
Joins two simplicial complexes together.
a
andb
are the complexes we are going to joina_verts
an optional parameter giving the number of vertices ina
if not specified, is computed dynamically.
Returns The cells in a
concatenated to the cells in b
, with the vertices in b
relabeled by those in a's length.