1.0.1 • Published 9 years ago

heightmap-contours v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

heightmap-contours

stable

Generate a series of 2D contour meshes over a heightmap.

npm.io

Usage

NPM

layers = heightmapContours(heightmap, [options])

heightmap is a 2D ndarray representing the heightmap. Its size ("shape") will determine the resolution of the final output.

Accepts the following options:

  • slices: the number of slices to make through the heightmap, hence the number of output layers.
  • border: boolean value. If true, add a border to the edges to ensure that all of the resulting layers are manifold (i.e. contain no gaps or forks). Defaults to true.

Returns an array of simplicial complexes, one for each layer starting from the top.

See Also

License

MIT, see LICENSE.md for details.