RegionNearestFunction
RegionNearestFunction[reg,…]
represents a function whose values give the nearest point in the region reg.
Details
- RegionNearestFunction works like Function.
- RegionNearestFunction is generated by RegionNearest[reg].
- RegionNearestFunction[reg,…][p] gives the point q∈reg that minimizes Norm[p-q].
Examples
open allclose allBasic Examples (1)
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:
Formula Regions (2)
The nearest point on a disk represented as an ImplicitRegion:
The nearest point on a disk represented as a ParametricRegion:
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:
Derived Regions (3)
The distance to a RegionIntersection:
The distance to a TransformedRegion:
The distance to a RegionBoundary:
Applications (2)
Visualize the nearest points in a region:
Use Locator to find the nearest point to a country region:
Properties & Relations (2)
RegionNearestFunction gives the same result when applied to a point as RegionNearest[r,p]:
Formulas returned by RegionNearest, evaluated at a point, coincide with RegionNearestFunction:
Possible Issues (1)
RegionNearestFunction can only be generated for ConstantRegionQ regions:
Text
Wolfram Research (2014), RegionNearestFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionNearestFunction.html.
CMS
Wolfram Language. 2014. "RegionNearestFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RegionNearestFunction.html.
APA
Wolfram Language. (2014). RegionNearestFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RegionNearestFunction.html