Documentation ¶
Overview ¶
Package genmarchingcubes implements the marching cubes algorithm.
Algorithm: * https://en.wikipedia.org/wiki/Marching_cubes
This implementation is based on: * https://github.com/soypat/sdf/blob/main/render/marchingcubes.go * https://github.com/fogleman/mc/blob/master/mc.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportToOBJ ¶
func Interpolate ¶
Interpolate returns the point that is close enough to the threshold value or interpolates between the two points if the threshold is between the two points. Inspired by: https://github.com/soypat/sdf/blob/main/render/marchingcubes.go
Types ¶
type Triangle ¶
func MarchingCubesGrid ¶
MarchingCubesGrid traverses the data grid with the given width, height, and depth, and evaluates each cube and returns the relevant triangles to represent the grid.