Signed distance function

From Wikipedia, the free encyclopedia

A disk (top) and its signed distance function (bottom, in red). The x-y plane in shown in blue.
A disk (top) and its signed distance function (bottom, in red). The x-y plane in shown in blue.
A more complicated set (top) and its signed distance function (bottom, in red).
A more complicated set (top) and its signed distance function (bottom, in red).

In mathematics and applications, the signed distance function of a set S in a metric space determines how close a given point x is to the boundary of S, with that function having positive values at points x inside S, it decreases in value as x approaches the boundary of S where the signed distance function is zero, and it takes negative values outside of S.

Formally, if (X, d) is a metric space, the signed distance function f is defined by

f(x)= 
\begin{cases}
 d(x, \partial S) & \mbox{ if } x\in S \\
 -d(x, \partial S)&  \mbox{ if } x\not\in S
\end{cases}

where

 d(x, \partial S)=\inf_{y\in\partial S}d(x, y)

(the ∂ symbol denotes the set boundary, while 'inf' is the infimum).

If S is a subset of the Euclidean space Rn with piecewise smooth boundary, the signed distance function is differentiable almost everywhere, and its gradient satisfies the eikonal equation

|\nabla f|=1.

Algorithms for calculating the signed distance function include the efficient fast marching method and the more general but slower level set method.

Signed distance functions are applied for example in computer vision.

[edit] See also

[edit] References

  • J.A. Sethian, Level set methods and fast marching methods. Cambridge University Press (1999). ISBN 0-521-64557-3.
This applied mathematics-related article is a stub. You can help Wikipedia by expanding it.