Skip to main content

A Computer-Assisted Proof of Correctness of a Marching Cubes Algorithm

  • Conference paper
Proceedings of the 22nd International Meshing Roundtable
  • 1986 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 219.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Schroeder, W.J., Martin, K.M.: Overview of visualization. In: Johnson, C., Hansen, C. (eds.) Visualization Handbook. Academic Press, Inc. (2004)

    Google Scholar 

  2. Newman, T.S., Yi, H.: A survey of the marching cubes algorithm. Computers & Graphics 30(5), 854–879 (2006)

    Article  Google Scholar 

  3. Lorensen, W.E., Cline, H.E.: Marching cubes: A high resolution 3D surface construction algorithm. SIGGRAPH Comput. Graph. 21(4), 163–169 (1987)

    Article  Google Scholar 

  4. Hammer, P.: Matlab implementation of marching cubes (2011), http://www.mathworks.us/matlabcentral/fileexchange/32506-marching-cubes

  5. Talos, I., Jakab, M., Kikinis, R., Shenton, M.: SPL-PNL brain atlas (March 2008), http://www.spl.harvard.edu/publications/item/view/1265

  6. Natarajan, B.K.: On generating topologically consistent isosurfaces from uniform samples. The Visual Computer 11, 52–62 (1994)

    Article  Google Scholar 

  7. Chernyaev, E.V.: Marching cubes 33: Construction of topologically correct isosurfaces. Technical Report CERN CN/95-17 (1995)

    Google Scholar 

  8. Montani, C., Scateni, R., Scopigno, R.: A modified look-up table for implicit disambiguation of marching cubes. The Visual Computer 10, 353–355 (1994)

    Article  Google Scholar 

  9. Lopes, A.M.: Accuracy in Scientific Visualization. PhD thesis, The University of Leeds (1999)

    Google Scholar 

  10. Dürst, M.J.: Letters: Additional reference to “marching cubes”. Computer Graphics 22, 72–73 (1988)

    Article  Google Scholar 

  11. 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)

    Article  Google Scholar 

  12. 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)

    Chapter  Google Scholar 

  13. 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)

    Chapter  Google Scholar 

  14. Bertot, Y., Castéran, P.: Coq’Art: The Calculus of Inductive Constructions. Springer (2004)

    Google Scholar 

  15. 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)

    Chapter  Google Scholar 

  16. 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)

    Chapter  Google Scholar 

  17. Megill, N.D.: Metamath: A Computer Language for Pure Mathematics. Lulu Publishing, Morrisville (2007), http://us.metamath.org/downloads/metamath.pdf

  18. Grabowski, A., Kornilowicz, A., Naumowicz, A.: Mizar in a nutshell. Journal of Formalized Reasoning 3(2) (2010) (Special Issue: User Tutorials I)

    Google Scholar 

  19. 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)

    Google Scholar 

  20. McCune, W.: Prover9 and Mace4 (2005-2010), http://www.cs.unm.edu/~mccune/prover9

  21. 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)

    Google Scholar 

  22. 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)

    Chapter  Google Scholar 

  23. INRIA France. The Coq proof assistant, version 8.4, http://coq.inria.fr

  24. Chlipala, A.: Certified Programming with Dependent Types (2013), http://adam.chlipala.net/cpdt

  25. 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

  26. 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)

    Chapter  Google Scholar 

  27. Gonthier, G.: Formal proof – the Four-Color Theorem. Notices of the AMS 55, 1382–1393 (2008)

    MathSciNet  MATH  Google Scholar 

  28. 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)

    Chapter  Google Scholar 

  29. 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)

    Article  MathSciNet  MATH  Google Scholar 

  30. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Andrey N. Chernikov .

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics