We deliver solutions for the AI eraâcombining symbolic computation, data-driven insights and deep technology expertise.
RegionNearest[reg,p]
gives a point in the region reg that is nearest the point p.
Details Examplesopen allclose all Basic Examples (2)Find the nearest point in the unit disk:
Find the nearest point in a MeshRegion:
With one argument you get a RegionNearestFunction:
Apply the function to lists of points to compute many nearest points:
Scope (16) Special Regions (7)Point sets:
Line:
Rectangle can be used in 2D:
Cuboid generalizes it to any dimension:
Visualize the nearest points on a rectangle:
Visualize the nearest points on a 2D simplex:
Visualize the nearest points in a hexagon:
Disk can be used in 2D:
Ball generalizes a disk in any dimension:
Visualize the nearest points on a 3D ball:
Disk can be an ellipse in 2D:
Ellipsoid generalizes ellipses to any dimension:
Plot the nearest points on an ellipse:
Formula Regions (2)The nearest point on a disk represented as an ImplicitRegion:
The nearest point on a disk represented as a ParametricRegion:
Using a rational parametrization of the disk:
Mesh Regions (4)The nearest point in a 1D BoundaryMeshRegion:
The nearest point in a 0D MeshRegion in 1D:
The nearest point in a 0D MeshRegion in 2D:
The nearest point in a 0D MeshRegion in 3D:
Applications (3)Visualize the nearest points in a region:
The nearest points along two circles:
Visualize a region by mapping uniform points to the region using RegionNearest:
Find the altitude of a triangle:
Properties & Relations (4)Only one point is returned in case there is a tie:
Visualize the nearest point chosen in red:
A point is a RegionMember if the nearest point to the region is itself:
RegionNearest is closely related to RegionDistance:
The distance to the nearest point is minimal:
Nearest gives nearest points for finite point regions:
Wolfram Research (2014), RegionNearest, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionNearest.html. TextWolfram Research (2014), RegionNearest, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionNearest.html.
CMSWolfram Language. 2014. "RegionNearest." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RegionNearest.html.
APAWolfram Language. (2014). RegionNearest. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RegionNearest.html
BibTeX@misc{reference.wolfram_2025_regionnearest, author="Wolfram Research", title="{RegionNearest}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/RegionNearest.html}", note=[Accessed: 11-July-2025 ]}
BibLaTeX@online{reference.wolfram_2025_regionnearest, organization={Wolfram Research}, title={RegionNearest}, year={2014}, url={https://reference.wolfram.com/language/ref/RegionNearest.html}, note=[Accessed: 11-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