# Marching Cubes

In this algorithm the user first specifies a threshold value. For this value, some
voxels will be entirely inside or outside the corresponding isosurface and some voxels
will be intersected by the isosurface. In the first pass of the algorithm the voxels that
are intersected by the threshold value are identified. In the second pass these voxels are
examined and a set of one or more polygons is produced, which are then output for
rendering. Each of the voxel's 8 vertices can be either inside or outside of the
isosurface value, thus, there are 2^8 = 256 possible ways in which a surface can intersect
the voxel. By symmetry these 256 ways can be reduced to 15. The exact edge intersection
points are determined and the polygons are created. Use a Table Lookup to Reduce Edge
Intersection Tests

Basic Idea

- For Each Cell Through Which an Isosurface Passes Create Small Polygons Approximating the
Surface Within the Cell
- Surfaces Intersect Edges Where Vertices Bracket the Threshold
- Maximum of 1 Intersection

## Edge Intersection Table

256 Cases Reduce to 15

Marching Cubes Algorithm

- User Specifies Threshold Value
- Read Four Slices Into Memory
- Scan Middle Two Slices and Create a Cell
- Classify Eight Vertices. Construct Index Number.
- Use Index to Look Up List of Edges
- Find 3 Surf/Edge Intersections via Linear Interpolation
- Calculate Unit Normal (Gradient) at 3 Intersections
- Output the Triangle Vertices and Vertex Normals

## Marching Cubes Example

Purkinje cell (Martone & Hessler)

Main Surface Fitting
Algorithm Page

HyperVis Table
of Contents

Last modified on February 16, 1999, G.
Scott Owen, owen@siggraph.org