Marching tetrahedra

Last updated
A cube divided into six tetrahedra, with one tetrahedron shaded Marching tetrahedrons.png
A cube divided into six tetrahedra, with one tetrahedron shaded

Marching tetrahedra is an algorithm in the field of computer graphics to render implicit surfaces. It clarifies a minor ambiguity problem of the marching cubes algorithm with some cube configurations. It was originally introduced in 1991. [1]

Contents

While the original marching cubes algorithm was protected by a software patent, marching tetrahedrons offered an alternative algorithm that did not require a patent license. More than 20 years have passed from the patent filing date (June 5, 1985), and the marching cubes algorithm can now be used freely. Optionally, the minor improvements of marching tetrahedrons may be used to correct the aforementioned ambiguity in some configurations.

In marching tetrahedra, each cube is split into six irregular tetrahedra by cutting the cube in half three times, cutting diagonally through each of the three pairs of opposing faces. In this way, the tetrahedra all 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 isosurface are approximated by linearly interpolating the values at the grid points.

Adjacent cubes share all edges in the connecting face, including the same diagonal. This is an important property to prevent cracks in the rendered surface, because interpolation of the two distinct diagonals of a face usually gives slightly 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.

Comparison with marching cubes

Marching tetrahedra 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 tetrahedra to process instead of one single cube. The process is unambiguous, so no additional ambiguity handling is necessary.

The downside is that the tessellation of a cube with tetrahedra requires a choice regarding the orientation of the tetrahedra, which may produce artificial "bumps" in the isosurface because of interpolation along the face diagonals. [2]

Diamond Lattice Cell - Alternative Cube Slicing Method

The cubical cells to be meshed can also be sliced into 5 tetrahedra, [3] using a (Diamond cubic) lattice as a basis. Cubes are mated on each side with another that has an opposite alignment of the tetrahedron around the centroid of the cube. Alternating vertices have a different number of tetrahedra intersecting on it, resulting in a slightly different mesh depending on position. When sliced this way, additional planes of symmetry are provided; having a tetrahedron around the centroid of the cube also generates very open spaces around points that are outside of the surface.

Visualization diamond cubic Visualisation diamond cubic.svg
Visualization diamond cubic

Diamond cubic has a variety of visualizations. Instead of empty cells, every cell should be filled, with alternating inner tetrahedrons. For each tetrahedron inscribed in a cube, using the vertices of the cube and edges that cross the faces of the cube, the tetrahedron will occupy 4 points; the other 4 points form the corners of an inverted tetrahedron; the cubic cells are tiled such that the position of the cell (x+y+z+...) is odd, use one, else use the inverted; otherwise near cells would use a different diagonal to compute the intersection.

Illustration of inverted inner Diamond Crystal Lattice cells Opposing-tet-cells.png
Illustration of inverted inner Diamond Crystal Lattice cells

Calculation of color based on a spacial texture system [4] can be done using the current fragment position to select from a repeating texture based on the pairs of Texel_(graphics) coordinates (x,y), (y,z) and (x,z) and scaling those values by the absolute value of each respective component of the normal z, x, and y respectively. Texture decalling can be applied as Texture_splatting by projecting the position of the current fragment in the direction of the decal' normal, to the plane of the texture given by an origin point and normal, then using a 'up' or 'right' directional vector to compute the texture coordinate.

This technique would be more closely compared with dual contouring which is listed under Isosurface, as a potential technique. DCL tetrahedra involves additional calculations for the diagonals across cube-faces, where dual contouring does not. This technique also has not addressed when two near points 'inside' a surface are a combined distance < 1 from the surface, where they should generate two points on the edge instead of 1; the related modification is Manifold Dual Contouring. [5]


See also

Related Research Articles

Cube A geometric 3-dimensional object with 6 square faces

In geometry, a cube is a three-dimensional solid object bounded by six square faces, facets or sides, with three meeting at each vertex.

Octahedron Polyhedron with 8 triangular faces

In geometry, an octahedron is a polyhedron with eight faces, twelve edges, and six vertices. The term is most commonly used to refer to the regular octahedron, a Platonic solid composed of eight equilateral triangles, four of which meet at each vertex.

Tetrahedron Polyhedron with 4 faces

In geometry, a tetrahedron, also known as a triangular pyramid, is a polyhedron composed of four triangular faces, six straight edges, and four vertex corners. The tetrahedron is the simplest of all the ordinary convex polyhedra and the only one that has fewer than 5 faces.

Tesseract Four-dimensional analogue of the cube

In geometry, the tesseract is the four-dimensional analogue of the cube; the tesseract is to the cube as the cube is to the square. Just as the surface of the cube consists of six square faces, the hypersurface of the tesseract consists of eight cubical cells. The tesseract is one of the six convex regular 4-polytopes.

Truncated tetrahedron

In geometry, the truncated tetrahedron is an Archimedean solid. It has 4 regular hexagonal faces, 4 equilateral triangle faces, 12 vertices and 18 edges. It can be constructed by truncating all 4 vertices of a regular tetrahedron at one third of the original edge length.

Truncated cube

In geometry, the truncated cube, or truncated hexahedron, is an Archimedean solid. It has 14 regular faces, 36 edges, and 24 vertices.

24-cell Regular object in four dimensional geometry

In geometry, the 24-cell is the convex regular 4-polytope (four-dimensional analogue of a Platonic solid) with Schläfli symbol {3,4,3}. It is also called C24, or the icositetrachoron, octaplex (short for "octahedral complex"), icosatetrahedroid, octacube, hyper-diamond or polyoctahedron, being constructed of octahedral cells.

600-cell Four-dimensional analog of the icosahedron

In geometry, the 600-cell is the convex regular 4-polytope (four-dimensional analogue of a Platonic solid) with Schläfli symbol {3,3,5}. It is also known as the C600, hexacosichoron and hexacosihedroid. It is also called a tetraplex (abbreviated from "tetrahedral complex") and a polytetrahedron, being bounded by tetrahedral cells.

16-cell Four-dimensional analog of the octahedron

In geometry, the 16-cell is the regular convex 4-polytope (four-dimensional analogue of a Platonic solid) with Schläfli symbol {3,3,4}. It is one of the six regular convex 4-polytopes first described by the Swiss mathematician Ludwig Schläfli in the mid-19th century. It is also called C16, hexadecachoron, or hexdecahedroid.

Isosurface

An isosurface is a three-dimensional analog of an isoline. It is a surface that represents points of a constant value within a volume of space; in other words, it is a level set of a continuous function whose domain is 3D-space.

Marching cubes Computer graphics algorithm

Marching cubes is a computer graphics algorithm, published in the 1987 SIGGRAPH proceedings by Lorensen and Cline, for extracting a polygonal mesh of an isosurface from a three-dimensional discrete scalar field. The applications of this algorithm are mainly concerned with medical visualizations such as CT and MRI scan data images, and special effects or 3-D modelling with what is usually called metaballs or other metasurfaces. The marching cubes algorithm is meant to be used for 3-D, the 2-D version of this algorithm is called the marching squares algorithm.

In 3D computer graphics, polygonal modeling is an approach for modeling objects by representing or approximating their surfaces using polygon meshes. Polygonal modeling is well suited to scanline rendering and is therefore the method of choice for real-time computer graphics. Alternate methods of representing 3D objects include NURBS surfaces, subdivision surfaces, and equation-based representations used in ray tracers.

Lloyds algorithm

In electrical engineering and computer science, Lloyd's algorithm, also known as Voronoi iteration or relaxation, is an algorithm named after Stuart P. Lloyd for finding evenly spaced sets of points in subsets of Euclidean spaces and partitions of these subsets into well-shaped and uniformly sized convex cells. Like the closely related k-means clustering algorithm, it repeatedly finds the centroid of each set in the partition and then re-partitions the input according to which of these centroids is closest. In this setting, the mean operation is an integral over a region of space, and the nearest centroid operation results in Voronoi diagrams.

Mesh generation Subdivision of space into cells

Mesh generation is the practice of creating a mesh, a subdivision of a continuous geometric space into discrete geometric and topological cells. Often these cells form a simplicial complex. Usually the cells partition the geometric input domain. Mesh cells are used as discrete local approximations of the larger domain. Meshes are created by computer algorithms, often with human guidance through a GUI, depending on the complexity of the domain and the type of mesh desired. The goal is to create a mesh that accurately captures the input domain geometry, with high-quality (well-shaped) cells, and without so many cells as to make subsequent calculations intractable. The mesh should also be fine in areas that are important for the subsequent calculations.


Marching squares is a computer graphics algorithm that generates contours for a two-dimensional scalar field. A similar method can be used to contour 2D triangle meshes.

Tetrahedral-octahedral honeycomb Quasiregular space-filling tesselation

The tetrahedral-octahedral honeycomb, alternated cubic honeycomb is a quasiregular space-filling tessellation in Euclidean 3-space. It is composed of alternating regular octahedra and tetrahedra in a ratio of 1:2.

Truncated 24-cells

In geometry, a truncated 24-cell is a uniform 4-polytope formed as the truncation of the regular 24-cell.

In geometry, a truncated tesseract is a uniform 4-polytope formed as the truncation of the regular tesseract.

Truncated 5-cell

In geometry, a truncated 5-cell is a uniform 4-polytope formed as the truncation of the regular 5-cell.

In geometry, a quasiregular polyhedron is a uniform polyhedron that has exactly two kinds of regular faces, which alternate around each vertex. They are vertex-transitive and edge-transitive, hence a step closer to regular polyhedra than the semiregular, which are merely vertex-transitive.

References

  1. Akio Doi, Akio Koide. "An Efficient Method of Triangulating Equi-Valued Surfaces by Using Tetrahedral Cells." IEICE Transactions of Information and Systems, Vol.E74-D No. 1, 1991
  2. Charles D. Hansen; Chris R. Johnson (2004). Visualization Handbook. Academic Press. pp. 9–11. ISBN   978-0-12-387582-2.
  3. d3x0r (14 April 2020). "Github Project - Marching Diamond Lattice Tetrahedra". GitHub .
  4. d3x0r (22 April 2020). "Github Project - Isosurface Multi-Texturing". GitHub .
  5. Lin X (30 Dec 2015). Manifold Dual Contouring.[ dead YouTube link ]