We deliver solutions for the AI eraâcombining symbolic computation, data-driven insights and deep technology expertise.
SignedRegionDistance[reg,p]
gives the minimum distance from the point p to the region reg if p is outside the region and the minimum distance to the complement of reg if p is inside the region.
Details and Options Examplesopen allclose all Basic Examples (2)Find the signed distance from a point inside to the unit disk:
Plot the distance as a function of position:
Find the signed distance from a point to a MeshRegion:
With one argument, you get a RegionDistanceFunction:
Scope (17) Special Regions (8)The signed distance to a Point is always non-negative, as it has no interior:
Plot the signed distance from a three-point set:
The signed distance to a Line can be negative in 1D:
But in 2D and above, it is always non-negative:
Plot the signed distance from a line in 2D:
The signed distance from a Cuboid can be negative in any dimension:
Plot the signed distance to a rectangle:
The signed distance from a full-dimensional Simplex can be negative:
But the signed distance to a lower-dimensional simplex cannot:
Plot the signed distance to a 2D simplex:
The signed distance to a Disk can be negative:
Ball generalizes Disk to any dimension:
Plot the signed distance to a disk:
The signed distance to an Ellipsoid can be negative in any dimension:
Plot the signed distance to an ellipsoid in 2D:
The distance to a Circle is always non-negative, as it has no interior:
The same goes for Sphere in any dimension:
Plot the signed distance to a circle:
Cone:
Formula Regions (2)The signed distance to a disk represented as an ImplicitRegion:
The distance to a disk represented as a ParametricRegion:
Using a rational parametrization of the disk:
Applications (2)If is a region that is full-dimensional, then the depth of a point is the negative signed region distance. Find the depth of {1,1} in Disk[{0,0},5]:
To illustrate it, you need to compute the nearest point in :
Find the depth of the point {1,1,1} in Cuboid[{0,0,0},{2,2,2}]:
To illustrate it, you need to compute the nearest point in :
Properties & Relations (5) Wolfram Research (2014), SignedRegionDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/SignedRegionDistance.html. TextWolfram Research (2014), SignedRegionDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/SignedRegionDistance.html.
CMSWolfram Language. 2014. "SignedRegionDistance." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SignedRegionDistance.html.
APAWolfram Language. (2014). SignedRegionDistance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SignedRegionDistance.html
BibTeX@misc{reference.wolfram_2025_signedregiondistance, author="Wolfram Research", title="{SignedRegionDistance}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/SignedRegionDistance.html}", note=[Accessed: 12-July-2025 ]}
BibLaTeX@online{reference.wolfram_2025_signedregiondistance, organization={Wolfram Research}, title={SignedRegionDistance}, year={2014}, url={https://reference.wolfram.com/language/ref/SignedRegionDistance.html}, note=[Accessed: 12-July-2025 ]}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4