Marching tetrahedrons
From Wikipedia, the free encyclopedia
Marching tetrahedrons is an algorithm in the field of computer graphics to render implicit surfaces. It was developed to circumvent a patent on the marching cubes algorithm. It also clarifies a minor ambiguity problem of marching cubes with some cube configurations.
Since more than 20 years have passed from then filing date of the marching cubes (June 5, 1985), the original algorithm can be used again, adding only the minor modification to circumvent the aforementioned ambiguity in some configurations.
In marching tetrahedrons, each cube is split in 6 tetrahedrons by cutting diagonally through the three pairs of opposing faces. In this way, they share one of the main diagonals of the cube. Instead of the twelve edges of the cube, we now have nineteen edges: the original twelve, six face diagonals, and the main diagonal. Just like in marching cubes, the intersections of these edges with the iso surface are approximated by linearly interpolating the values at the grid points.
Adjacent cubes share all edges in the connecting face. This is an important property to prevent cracks in the rendered surface. Interpolation of the two distinct diagonals of a face usually give different intersection points. An added benefit is that up to five computed intersection points can be reused when handling the neighbor cube. This includes the computed surface normals and other graphics attributes at the intersection points.
Each tetrahedron has sixteen possible configurations, falling into three classes: no intersection, intersection in one triangle and intersection in two (adjacent) triangles. It is straightforward to enumerate all sixteen configurations and map them to vertex index lists defining the appropriate triangle strips.
[edit] Comparison
Marching tetrahedrons computes up to nineteen edge intersections per cube, where marching cubes only requires twelve. Only one of these intersections cannot be shared with an adjacent cube (the one on the main diagonal), but sharing on all faces of the cube complicates the algorithm and increases memory requirements considerably. On the other hand, the additional intersections provide for a slightly better sampling resolution.
The number of configurations, determining the size of the commonly used lookup tables, is much smaller, since only four rather than eight separate vertices are involved per tetrahedron. There are six tetrahedrons to process instead of one single cube. The process is unambiguous, so no additional ambiguity handling is necessary.