New in CGAL: Isosurfacing

CGAL/cgal

New in CGAL: Isosurfacing


Mael Rouxel-Labbé°, Julian Stahl†, Daniel Zint*, Pierre Alliez*.

°GeometryFactory, †Friedrich-Alexander-Universität, *INRIA Sophia Antipolis



"Isosurfacing", also known as "isosurface extraction" or "contouring", is the process of constructing the isosurface corresponding to a given value field and isovalue. Isosurfacing is often needed for volume visualization and for the simulation of physical phenomena.

CGAL offers various packages and functions that can be used to generate meshes for various types of input data (see chapter Mesh Generation ), most notably the package 3D Mesh Generation, which is able to generate surface and volume meshes of implicit functions, 3D images, polyhedral domains, etc. This package is based on one of the most fundamental structures in computationa geometry, the Delaunay triangulation. However, a large category of classical isosurfacing methods had been missing from CGAL: the approaches based on contouring using volumetric grids.


New Package: 3D Isosurfacing

The initial version of the new package, 3D Isosurfacing offers the following methods to extract isosurfaces from 3D value fields:

These contouring techniques rely on the partition of the 3D space and of the field to construct an approximate representation of the isosurface. The 3D value field can be described through various representations: an implicit function, an interpolated set of discrete sampling values, a 3D image, etc. (see the examples in the documentation). The isovalue is user-defined. The output is a polygon soup, made either of triangles or quads depending on the method, and may consist of a single connected component, or multiple, disjoint components. Each method offer tuning options to select specific strategies, such as the placement at the center of the cell or optimized using Quadric Error Metrics (QEM) for Dual Contouring.



Contouring a simple implicit function with Marching Cubes (left) and Dual Contouring (DC).

Topologically correct Marching Cubes

Topologically Correct Marching Cubes is an extension to the Marching Cubes algorithm which provides additional guarantees for the output [1]. More specifically, it generates a mesh that is homeomorphic to the trilinear interpolant of the input value field inside each cube. This means that the output mesh can accurately represent small complex features. For example, a tunnel of the isosurface within a single cell is topologically resolved. To achieve this, the algorithm can insert additional vertices within cells. Furthermore, the mesh is guaranteed to be 2-manifold and watertight, as long as the isosurface does not intersect the domain boundaries..



Trilinearly interpolated surface (left), Marching Cubes (middle), and Topologically Correct Marching Cubes (right). The latter correctly recovers the topology of the surface.

Status

The package 3D Isosurfacing has been available since CGAL 6.1, released in the fall of 2025.

Documentation of the "3D Isosurfacing" package
CGAL "main" branch on GitHub

Bibliography

[1] Roberto Grosso. Construction of topologically correct and manifold isosurfaces. In Computer Graphics Forum, volume 35, pages 187–196. Wiley Online Library, 2016.