RegionHausdorffDistance
RegionHausdorffDistance[reg1,reg2]
gives the Hausdorff distance between the regions reg1 and reg2.
Details and Options
- RegionHausdorffDistance is also known as Hausdorff metric and Pompeiu–Hausdorff distance.
- The Hausdorff distance measures how different two regions are from each other.
- RegionHausdorffDistance is the greatest of all distances from a point in one region to the closest point in the other region.
- The distance between points p and q is taken to be Norm[p-q].
- RegionHausdorffDistance is effectively given by the maximum of MaxValue[MinValue[Norm[p-q],q∈reg2],p∈reg1] and MaxValue[MinValue[Norm[p-q],q∈reg1],p∈reg2].
- Unless the regions are closed, the Hausdorff distance may not be attained by points in the region but in the closure of the regions.
- The Hausdorff distance between two regions reg1 and reg2 is ϵ if reg1⊆RegionDilation[reg2,ϵ] and reg2⊆RegionDilation[reg1,ϵ].
Examples
open allclose allBasic Examples (4)
Find the Hausdorff distance between two disks:
Find the Hausdorff distance between the unit disk and a regular polygon:
Plot the Hausdorff distance as the number of sides increases:
Find the Hausdorff distance between two point clouds:
Find the Hausdorff distance between a MeshRegion and its convex hull:
Scope (9)
Special Regions (8)
RegionHausdorffDistance accepts coordinate lists:
Options (2)
WorkingPrecision (2)
RegionHausdorffDistance 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 RegionHausdorffDistance using 30 digits of precision:
Applications (1)
Properties & Relations (4)
The Hausdorff distance between two points is equivalent to the EuclideanDistance:
The Hausdorff distance between two point sets is the maximum EuclideanDistance from any point to the other set:
The Hausdorff distance between a region and a single point is the furthest distance of the point to any point in the region:
RegionDistance can be used to find the nearest distance from a point to a region:
Text
Wolfram Research (2023), RegionHausdorffDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionHausdorffDistance.html.
CMS
Wolfram Language. 2023. "RegionHausdorffDistance." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RegionHausdorffDistance.html.
APA
Wolfram Language. (2023). RegionHausdorffDistance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RegionHausdorffDistance.html