RegionFarthestDistance

RegionFarthestDistance[reg1,reg2]

gives the farthest distance between points in the regions reg1 and reg2.

Details and Options

  • RegionFarthestDistance is also known as maximum region distance and spanning distance.
  • The farthest distance measures how far apart points of two regions are.
  • RegionFarthestDistance is the greatest of all distances from a point in one region to all points in the other region.
  • The distance between points p and q is taken to be Norm[p-q].
  • RegionFarthestDistance is effectively given by MaxValue[Norm[p-q],{preg1,qreg2}].
  • Unless the regions are closed, the farthest distance may not be attained by points in the region but in the closure of the regions.

Examples

open allclose all

Basic Examples  (3)

Find the farthest distance from a point to the unit disk:

Plot the distance as a function of position:

Find the farthest distance between a disk and rectangle:

Show the regions:

Find the farthest distance between two meshes:

Show the meshes:

Scope  (16)

Special Regions  (8)

Points:

RegionFarthestDistance accepts coordinate lists:

Lines:

Polygons:

Simplices:

Boxes:

Balls:

Spheres:

Regions in n:

Formula Regions  (2)

The distance to a disk represented as an ImplicitRegion:

A cylinder:

The distance to a disk represented as a ParametricRegion:

Using a rational parametrization of the disk:

A cylinder:

Mesh Regions  (1)

The farthest distance between two 1D meshes:

2D:

3D:

Derived Regions  (2)

The distance to a RegionIntersection:

The distance to a TransformedRegion:

Geographic Regions  (3)

The distance between polygons with GeoPosition:

The distance between polygons with GeoGridPosition:

RegionFarthestDistance works on polygons with geographic entities:

Options  (2)

WorkingPrecision  (2)

RegionFarthestDistance will try to compute the distance using the same precision as its inputs:

Compute the distance using machine arithmetic:

In some cases, the exact answer cannot be computed:

Find the RegionFarthestDistance using 30 digits of precision:

Properties & Relations  (4)

The farthest distance between a FullRegion and a non-empty region is Infinity:

The farthest distance to an EmptyRegion is negative Infinity:

The farthest distance between two points is equivalent to the EuclideanDistance:

The farthest distance between two point sets is the maximum EuclideanDistance between any two points:

The farthest distance between a region and a single point is equivalent to the RegionHausdorffDistance:

Wolfram Research (2023), RegionFarthestDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionFarthestDistance.html.

Text

Wolfram Research (2023), RegionFarthestDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionFarthestDistance.html.

CMS

Wolfram Language. 2023. "RegionFarthestDistance." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RegionFarthestDistance.html.

APA

Wolfram Language. (2023). RegionFarthestDistance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RegionFarthestDistance.html

BibTeX

@misc{reference.wolfram_2024_regionfarthestdistance, author="Wolfram Research", title="{RegionFarthestDistance}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/RegionFarthestDistance.html}", note=[Accessed: 28-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_regionfarthestdistance, organization={Wolfram Research}, title={RegionFarthestDistance}, year={2023}, url={https://reference.wolfram.com/language/ref/RegionFarthestDistance.html}, note=[Accessed: 28-April-2024 ]}