## Publication Details

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

Andrey Chernikov and Jing Xu.

Published in 22^{nd} International Meshing Roundtable, pages 505 -- 523, Orlando, FL, October, 2013

Abstract

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 possi- ble 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 ﬁxed 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 pro- gram which checks that all the entries in the table satisfy some suﬃcient 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 veriﬁes that the proof is logically correct, in the sense that its conclusions indeed logically follow from the assumptions. Coq oﬀers 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.