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.

AABB Tree

When a sampling point is located near some part of a mesh, it is utterly useless to compute distances to triangles that are “on the other side” of the mesh. One might think that the concept of “closeness” to some triangles of the mesh is inseparable from the distance we intend to compute, but it turns out that there is another set of approaches utilizing a “friend” of programmers who want to accelerate a process handling arbitrarily large amounts of data – a binary tree