marchingcubes package

Submodules

marchingcubes.constants module

marchingcubes.shape module

marchingcubes.shape.construct(size: float, surface_level: float = 0.0, n: int = 1, interpolate: bool = True) list[list[ndarray]][source]

Construct a triangulated shape on a surface level determined by opensimplex noise

Parameters:
  • size – size of the shape (required)

  • surface_level – level at which the surface is to be constructed (optional)

  • noise_scale – value used to scale the noise (optional)

  • n

  • interpolate – enable linear interpolation between vertices (optional)

Returns:

vertices where first and last index is the same

marchingcubes.shape.plot(triangles: list)[source]

Plot a list of triangles

Parameters:

triangles – triangle vertices where first and last index is the same

Module contents