![cover image](https://wikiwandv2-19431.kxcdn.com/_next/image?url=https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/Signed_distance1.png/640px-Signed_distance1.png&w=640&q=50)
Signed distance function
Distance from a point to the boundary of a set / From Wikipedia, the free encyclopedia
In mathematics and its applications, the signed distance function or signed distance field (SDF) is the orthogonal distance of a given point x to the boundary of a set Ω in a metric space (such as the surface of a geometric shape), with the sign determined by whether or not x is in the interior of Ω. The function has positive values at points x inside Ω, it decreases in value as x approaches the boundary of Ω where the signed distance function is zero, and it takes negative values outside of Ω.[1] However, the alternative convention is also sometimes taken instead (i.e., negative inside Ω and positive outside).[2] The concept also sometimes goes by the name oriented distance function/field.
![Thumb image](http://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/Signed_distance1.png/640px-Signed_distance1.png)
![Thumb image](http://upload.wikimedia.org/wikipedia/commons/thumb/d/d4/Signed_distance2.png/640px-Signed_distance2.png)