Skip to main content

Marching Cubes is an algorithm for generating a mesh (rounded or with cut corners) from a 3D grid of voxels.

This is done by adding together small 'meshes' that represent each voxel's contribution to the total mesh, each small mesh being pulled from a list of pre-computed states based upon the voxel's surrounding voxels.

The 2D version of this algorithm is called Marching Squares.