Computing the Sign of Discrete Distance Fields

Determining whether a point in space is inside/outside of a given shape depends entirely on the shape’s topological properties. Shapes with holes and/or self-intersections do not have a mathematically guaranteed interior and exterior (by Jordan’s curve theorem). However, with sufficiently fine voxel outline of a given polygonal mesh, we can enclose the approximate interior and flood-fill the remaining voxels to achieve sign computation of our distancie field.

The Fast Sweeping Algorithm

The distance function is a solution to a type of Eikonal equation. The fastest O(n) method for numerically solving Eikonal equations was introduced by H. Zhao in his 2005 paper called the Fast Sweeping Method.

Octree for Voxel Outlines of a Triangular Mesh

The advantage of octrees is that they can subdivide the surrounding space into self-similar cells. Starting with a bounding cube we can then produce cells that can be thought of as a subset of a regular grid.