Marching cubes
Marching cubes is a computer graphics algorithm, published in the 1987 SIGGRAPH proceedings by Lorensen and Cline,[1] for extracting a polygonal mesh of an isosurface from a three-dimensional discrete scalar field (the elements of which are sometimes called voxels). 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.
History
The algorithm was developed by William E. Lorensen (1946-2019) and Harvey E. Cline as a result of their research for General Electric. At General Electric they worked on a way to efficiently visualize data from CT and MRI devices.[2]
The premise of the algorithm is to divide the input volume into a discrete set of cubes. By assuming linear reconstruction filtering, each cube, which contains a piece of a given isosurface, can easily be identified because the sample values at the cube vertices must span the target isosurface value. For each cube containing a section of the isosurface, a triangular mesh that approximates the behavior of the trilinear interpolant in the interior cube is generated.
The first published version of the algorithm exploited rotational and reflective symmetry and also sign changes to build the table with 15 unique cases. However, due to the existence of ambiguities in the trilinear interpolant behavior in the cube faces and interior, the meshes extracted by the Marching Cubes presented discontinuities and topological issues. Given a cube of the grid, a face ambiguity occurs when its face vertices have alternating signs. That is, the vertices of one diagonal on this face are positive and the vertices on the other are negative. Observe that in this case, the signs of the face vertices are insufficient to determine the correct way to triangulate the isosurface. Similarly, an interior ambiguity occurs when the signs of the cube vertices are insufficient to determine the correct surface triangulation, i.e., when multiple triangulations are possible for the same cube configuration.
The popularity of the Marching Cubes and its widespread adoption resulted in several improvements in the algorithm to deal with the ambiguities and to correctly track the behavior of the interpolant. Durst[3] in 1988 was the first to note that the triangulation table proposed by Lorensen and Cline was incomplete, and that certain Marching Cubes cases allow multiple triangulations. Durst's 'additional reference' was to an earlier, more efficient (see de Araujo[4]) isosurface polygonization algorithm by Wyvill, Wyvill and McPheeters.[5] Later, Nielson and Hamann[6] in 1991 observed the existence of ambiguities in the interpolant behavior on the face of the cube. They proposed a test called Asymptotic Decider to correctly track the interpolant on the faces of the cube. In fact, as observed by Natarajan[7] in 1994, this ambiguity problem also occurs inside the cube. In his work, the author proposed a disambiguation test based on the interpolant critical points, and added four new cases to the Marching Cubes triangulation table (subcases of the cases 3, 4, 6 and 7). At this point, even with all the improvements proposed to the algorithm and its triangulation table, the meshes generated by the Marching Cubes still had topological incoherencies.
The Marching Cubes 33, proposed by Chernyaev[8] in 1995, is one of the first isosurface extraction algorithms intended to preserve the topology of the trilinear interpolant. In his work, Chernyaev extends to 33 the number of cases in the triangulation lookup table. He then proposes a different approach to solve the interior ambiguities, which is based on the Asymptotic Decider. Later, in 2003, Nielson[9] proved that Chernyaev's lookup table is complete and can represent all the possible behaviors of the trilinear interpolant, and Lewiner et al.[10] proposed an implementation to the algorithm. Also in 2003 Lopes and Brodlie[11] extended the tests proposed by Natarajan.[7] In 2013, Custodio et al.[12] noted and corrected algorithmic inaccuracies that compromised the topological correctness of the mesh generated by the Marching Cubes 33 algorithm proposed by Chernyaev.[8]
Algorithm
The algorithm proceeds through the scalar field, taking eight neighbor locations at a time (thus forming an imaginary cube), then determining the polygon(s) needed to represent the part of the isosurface that passes through this cube. The individual polygons are then fused into the desired surface.
This is done by creating an index to a precalculated array of 256 possible polygon configurations (28=256) within the cube, by treating each of the 8 scalar values as a bit in an 8-bit integer. If the scalar's value is higher than the iso-value (i.e., it is inside the surface) then the appropriate bit is set to one, while if it is lower (outside), it is set to zero. The final value, after all eight scalars are checked, is the actual index to the polygon indices array.
Finally each vertex of the generated polygons is placed on the appropriate position along the cube's edge by linearly interpolating the two scalar values that are connected by that edge.
The gradient of the scalar field at each grid point is also the normal vector of a hypothetical isosurface passing from that point. Therefore, these normals may be interpolated along the edges of each cube to find the normals of the generated vertices which are essential for shading the resulting mesh with some illumination model.
Patent issues
An implementation of the marching cubes algorithm was patented as United States Patent 4,710,876.[2] Another similar algorithm was developed, called marching tetrahedra, in order to circumvent the patent as well as solve a minor ambiguity problem of marching cubes with some cube configurations. The patent expired in 2005, and it is now legal for the graphics community to use it without royalties since more than the 20 years have passed from its issue date (December 1, 1987[2]).
Sources
- ↑ Lorensen, William E.; Cline, Harvey E. (1 August 1987). "Marching cubes: A high resolution 3D surface construction algorithm". ACM SIGGRAPH Computer Graphics 21 (4): 163–169. doi:10.1145/37402.37422.
- ↑ 2.0 2.1 2.2 & Lorensen, William"System and method for the display of surface structures contained within the interior region of a solid body" US patent granted US4710876A, issued 1987-12-01
- ↑ Dürst, Martin J. (1988-10-01). "Re: Additional reference to "marching cubes"". ACM SIGGRAPH Computer Graphics 22 (5): 243. doi:10.1145/378267.378271. ISSN 0097-8930.
- ↑ de Araujo, Bruno; Lopes, Daniel; Jepp, Pauline; Jorge, Joaquim; Wyvill, Brian (2015). "A Survey on Implicit Surface Polygonization". ACM Computing Surveys 47 (4): 60:1–60:39. doi:10.1145/2732197.
- ↑ Wyvill, Geoff; Wyvill, Brian; McPheeters, Craig (1986). "Data structures for soft objects". The Visual Computer 2 (4): 227–234. doi:10.1007/BF01900346.
- ↑ Nielson, G.M.; Hamann, B. (1991). "The asymptotic decider: Resolving the ambiguity in marching cubes". Proceeding Visualization '91. pp. 83–91. doi:10.1109/visual.1991.175782. ISBN 978-0818622458.
- ↑ 7.0 7.1 Natarajan, B. K. (January 1994). "On generating topologically consistent isosurfaces from uniform samples". The Visual Computer 11 (1): 52–62. doi:10.1007/bf01900699. ISSN 0178-2789.
- ↑ 8.0 8.1 V., Chernyaev, E. (1995). Marching Cubes 33 : construction of topologically correct isosurfaces : presented at GRAPHICON '95, Saint-Petersburg, Russia, 03-07.07.1995. CERN. Computing and Networks Division. OCLC 897851506.
- ↑ Nielson, G.M. (2003). "On marching cubes". IEEE Transactions on Visualization and Computer Graphics 9 (3): 283–297. doi:10.1109/TVCG.2003.1207437.
- ↑ Lewiner, Thomas; Lopes, Hélio; Vieira, Antônio Wilson; Tavares, Geovan (January 2003). "Efficient Implementation of Marching Cubes' Cases with Topological Guarantees". Journal of Graphics Tools 8 (2): 1–15. doi:10.1080/10867651.2003.10487582. ISSN 1086-7651.
- ↑ Lopes, A.; Brodlie, K. (2003). "Improving the robustness and accuracy of the marching cubes algorithm for isosurfacing". IEEE Transactions on Visualization and Computer Graphics 9: 16–29. doi:10.1109/tvcg.2003.1175094. https://estudogeral.sib.uc.pt/bitstream/10316/12925/1/Improving%20the%20robustness%20and%20accuracy.pdf.
- ↑ Custodio, Lis; Etiene, Tiago; Pesco, Sinesio; Silva, Claudio (November 2013). "Practical considerations on Marching Cubes 33 topological correctness". Computers & Graphics 37 (7): 840–850. doi:10.1016/j.cag.2013.04.004. ISSN 0097-8493.
See also
External links
- Lorensen, W. E.; Cline, Harvey E. (1987). "Marching cubes: A high resolution 3d surface construction algorithm". ACM Computer Graphics 21 (4): 163–169. doi:10.1145/37402.37422.
- Nielson, G.M.; Hamann, B. (1991). "The asymptotic decider: Resolving the ambiguity in marching cubes". Proceeding Visualization '91. pp. 83–91. doi:10.1109/VISUAL.1991.175782. ISBN 9780818622458.
- Montani, Claudio; Scateni, Riccardo; Scopigno, Roberto (1994). "A modified look-up table for implicit disambiguation of Marching cubes". The Visual Computer 10 (6): 353–355. doi:10.1007/BF01900830.
- Nielson, G.M.; Junwon Sung (1997). "Interval volume tetrahedrization". Proceedings. Visualization '97 (Cat. No. 97CB36155). pp. 221–228. doi:10.1109/VISUAL.1997.663886. ISBN 978-0-8186-8262-9.
- Paul Bourke. "Overview and source code". http://paulbourke.net/geometry/polygonise/.
- Matthew Ward. "GameDev overview". http://www.gamedev.net/page/resources/_/technical/math-and-physics/overview-of-marching-cubes-algorithm-r424.
- "Introductory description with additional graphics". http://users.polytech.unice.fr/~lingrand/MarchingCubes/algo.html.
- "Marching Cubes". http://www.marchingcubes.org/index.php/Marching_Cubes.. Some of the early history of Marching Cubes.
- Newman, Timothy S.; Yi, Hong (2006). "A survey of the marching cubes algorithm". Computers and Graphics 30 (5): 854–879. doi:10.1016/j.cag.2006.07.021.
- Stephan Diehl. "Specializing visualization algorithms". http://extras.springer.com/2003/978-1-4020-7259-8/media/diehl/diehl.pdf.
![]() | Original source: https://en.wikipedia.org/wiki/Marching cubes.
Read more |