marchingsquaresmarchingcubes
Marching squares and marching cubes are related algorithms used to extract contour lines and surfaces from scalar fields defined on regular grids. Marching squares is the two dimensional predecessor that operates on each square cell formed by four neighboring samples. Each corner is classified as above or below a chosen isovalue. The resulting 4-bit index selects a polygonal configuration from a compact lookup table. Linear interpolation along the cell edges locates the points where the isovalue crosses the edges, and the segments connect to form an iso-contour across the grid.
Marching cubes extends the idea to three dimensions. It processes each cube formed by eight corner samples
Applications span medical imaging, scientific visualization, geology, and computer graphics, where iso-surfaces or contours reveal structure
The term marching squares marching cubes is sometimes used to refer collectively to the two related iso-contouring