var isosurface =var mesh = isosurfaceconsole
npm install isosurface
var isosurface =
Extracts an isosurface from
potential using surface nets with resolution given by
dims: A 3D vector of integers representing the resolution of the isosurface
potential(x,y,z): A scalar valued potential function taking 3 coordinates as arguments returning a scalar.
bounds: A pair of 3D vectors
[lo, hi]giving bounds on the potential to sample. If not specified, default is
Returns: A mesh object with the following members:
positions: The coordinates of the vertices of the mesh
cells: The faces of the mesh.
Same as above, except uses marching cubes instead of surface nets to extract the isosurface.
Same as above, except uses marching tetrahedra instead of surface nets to extract the isosurface.
(c) 2012-2014 Mikola Lysenko. MIT License