Summary
The Marching Cubes algorithm is a well known and widely used approach for extracting a triangulated isosurface from a three-dimensional rectilinear grid of uniformly sampled data values. The algorithm relies on a large manually constructed table which exhaustively enumerates all possible patterns in which the isosurface can intersect a cubical cell of the grid. For each pattern the table contains the local connectivity of the triangles. The construction of this table is labor intensive and error prone. Indeed, the original paper allowed for topological holes in the surface. This problem was later fixed by several authors, however a formal proof of correctness to our knowledge was never presented. In our opinion the most reliable approach to constructing a formal proof for this algorithm is to write a computer program which checks that all the entries in the table satisfy some sufficient condition of correctness. In this paper we present our formal proof which follows this approach, developed with the Coq proof assistant software. The script of our proof can be executed by Coq which verifies that the proof is logically correct, in the sense that its conclusions indeed logically follow from the assumptions. Coq offers a number of helpful features that automate proof development. However, Coq cannot check that the development corresponds to the problem we wish to solve, therefore, this correspondence is elaborated upon in this paper. Our complete Coq development is available online.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Schroeder, W.J., Martin, K.M.: Overview of visualization. In: Johnson, C., Hansen, C. (eds.) Visualization Handbook. Academic Press, Inc. (2004)
Newman, T.S., Yi, H.: A survey of the marching cubes algorithm. Computers & Graphics 30(5), 854–879 (2006)
Lorensen, W.E., Cline, H.E.: Marching cubes: A high resolution 3D surface construction algorithm. SIGGRAPH Comput. Graph. 21(4), 163–169 (1987)
Hammer, P.: Matlab implementation of marching cubes (2011), http://www.mathworks.us/matlabcentral/fileexchange/32506-marching-cubes
Talos, I., Jakab, M., Kikinis, R., Shenton, M.: SPL-PNL brain atlas (March 2008), http://www.spl.harvard.edu/publications/item/view/1265
Natarajan, B.K.: On generating topologically consistent isosurfaces from uniform samples. The Visual Computer 11, 52–62 (1994)
Chernyaev, E.V.: Marching cubes 33: Construction of topologically correct isosurfaces. Technical Report CERN CN/95-17 (1995)
Montani, C., Scateni, R., Scopigno, R.: A modified look-up table for implicit disambiguation of marching cubes. The Visual Computer 10, 353–355 (1994)
Lopes, A.M.: Accuracy in Scientific Visualization. PhD thesis, The University of Leeds (1999)
Dürst, M.J.: Letters: Additional reference to “marching cubes”. Computer Graphics 22, 72–73 (1988)
Heiden, W., Goetze, T., Brickmann, J.: Fast generation of molecular surfaces from 3D data fields with an enhanced “marching cube” algorithm. Journal of Computational Chemistry 14, 246–250 (1993)
Kaufmann, M., Moore, J.S.: An ACL2 Tutorial. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 17–21. Springer, Heidelberg (2008)
Bove, A., Dybjer, P., Norell, U.: A Brief Overview of Agda – A Functional Language with Dependent Types. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 73–78. Springer, Heidelberg (2009)
Bertot, Y., Castéran, P.: Coq’Art: The Calculus of Inductive Constructions. Springer (2004)
Harrison, J.: HOL light: An overview. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 60–66. Springer, Heidelberg (2009)
Blanchette, J.C., Bulwahn, L., Nipkow, T.: Automatic Proof and Disproof in Isabelle/HOL. In: Tinelli, C., Sofronie-Stokkermans, V. (eds.) FroCoS 2011. LNCS, vol. 6989, pp. 12–27. Springer, Heidelberg (2011)
Megill, N.D.: Metamath: A Computer Language for Pure Mathematics. Lulu Publishing, Morrisville (2007), http://us.metamath.org/downloads/metamath.pdf
Grabowski, A., Kornilowicz, A., Naumowicz, A.: Mizar in a nutshell. Journal of Formalized Reasoning 3(2) (2010) (Special Issue: User Tutorials I)
Rahli, V., Bickford, M., Anand, A.: Formal program optimization in Nuprl using computational equivalence and partial types. In: The 4th Conference on Interactive Theorem Proving, Rennes, France, pp. 261–278 (July 2013)
McCune, W.: Prover9 and Mace4 (2005-2010), http://www.cs.unm.edu/~mccune/prover9
Owre, S., Rushby, J.M., Shankar, N.: PVS: A prototype verification system. In: Kapur, D. (ed.) CADE 1992. LNCS, vol. 607, pp. 748–752. Springer, Heidelberg (1992)
Pfenning, F., Schürmann, C.: System description: Twelf - A meta-logical framework for deductive systems. In: Ganzinger, H. (ed.) CADE 1999. LNCS (LNAI), vol. 1632, pp. 202–206. Springer, Heidelberg (1999)
INRIA France. The Coq proof assistant, version 8.4, http://coq.inria.fr
Chlipala, A.: Certified Programming with Dependent Types (2013), http://adam.chlipala.net/cpdt
Pierce, B.C., Casinghino, C., Greenberg, M., Hriţcu, C., Sjöberg, V., Yorgey, B., et al. Software Foundations (2012), http://www.cis.upenn.edu/~bcpierce/sf
Dufourd, J.-F., Bertot, Y.: Formal Study of Plane Delaunay Triangulation. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 211–226. Springer, Heidelberg (2010)
Gonthier, G.: Formal proof – the Four-Color Theorem. Notices of the AMS 55, 1382–1393 (2008)
Dufourd, J.-F.: A hypermap framework for computer-aided proofs in surface subdivisions: genus theorem and Euler’s formula. In: Proceedings of the 2007 ACM Symposium on Applied Computing, pp. 757–761. ACM, New York (2007)
Brun, C., Dufourd, J.-F., Magaud, N.: Designing and proving correct a convex hull algorithm with hypermaps in Coq. Computational Geometry: Theory and Applications 45(8), 436–457 (2012)
Labelle, F., Shewchuk, J.R.: Isosurface stuffing: Fast tetrahedral meshes with good dihedral angles. ACM Transactions on Graphics 26(3), 57.1 – 57.10 (2007)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Chernikov, A.N., Xu, J. (2014). A Computer-Assisted Proof of Correctness of a Marching Cubes Algorithm. In: Sarrate, J., Staten, M. (eds) Proceedings of the 22nd International Meshing Roundtable. Springer, Cham. https://doi.org/10.1007/978-3-319-02335-9_28
Download citation
DOI: https://doi.org/10.1007/978-3-319-02335-9_28
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-02334-2
Online ISBN: 978-3-319-02335-9
eBook Packages: EngineeringEngineering (R0)