RegionHausdorffDistance
✖
RegionHausdorffDistance
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)Summary of the most common use cases
Find the Hausdorff distance between two disks:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-cws0re


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-tikzl5

Find the Hausdorff distance between the unit disk and a regular polygon:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-gjir76


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-1czcc9

Plot the Hausdorff distance as the number of sides increases:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-r89lnj

Find the Hausdorff distance between two point clouds:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-7eyj5s

Find the Hausdorff distance between a MeshRegion and its convex hull:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-8xo4vo

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-797pmr


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-5oncx0

Scope (9)Survey of the scope of standard use cases
Special Regions (8)

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-6o0jua

RegionHausdorffDistance accepts coordinate lists:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-0ws9nd


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-7mi415


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-jz43r0


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-00041e


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-jdusf5


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-esyw4l


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-0vnjs9


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-flk5m8


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-xmflef


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-0e5fc5


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-37qor7


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-igxar6


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-cfib7z


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-1kaba8


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-jnsvsc


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-5kmar3


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-42668q


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-etilu9


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-bfevl7

Mesh Regions (1)
The Hausdorff distance between two 1D meshes:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-xgplru

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-73wvv8


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-868gxk

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-cqafsq


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-vsr1m2


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-zzum8l

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-sjlvdn


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-qtc04f

Options (2)Common values & functionality for each option
WorkingPrecision (2)
RegionHausdorffDistance will try to compute the distance using the same precision as its inputs:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-c9oegt

Compute the distance using machine arithmetic:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-cuwkuv

In some cases, the exact answer cannot be computed:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-c62f2s

Find the RegionHausdorffDistance using 30 digits of precision:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-tbnvx3

Applications (1)Sample problems that can be solved with this function
Region Reconstruction (1)
Reconstruct a mesh from random point samples:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-bu39zz
Determine the Hausdorff distance between the ground truth and reconstructed mesh:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-p996eq

Plot how the Hausdorff distance decreases with larger sample counts:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-pyrh91

Properties & Relations (4)Properties of the function, and connections to other functions
The Hausdorff distance between two points is equivalent to the EuclideanDistance:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-r36bz3


https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-bjlsyt

The Hausdorff distance between two point sets is the maximum EuclideanDistance from any point to the other set:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-pkhc76

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-6ymd5k

The Hausdorff distance between a region and a single point is the furthest distance of the point to any point in the region:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-uq0mk1

RegionDistance can be used to find the nearest distance from a point to a region:

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-2f75l8

https://wolfram.com/xid/0e2yzb16oninfyi0ac5e-u671gz

Wolfram Research (2023), RegionHausdorffDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionHausdorffDistance.html.
Text
Wolfram Research (2023), RegionHausdorffDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionHausdorffDistance.html.
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.
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
Wolfram Language. (2023). RegionHausdorffDistance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RegionHausdorffDistance.html
BibTeX
@misc{reference.wolfram_2025_regionhausdorffdistance, author="Wolfram Research", title="{RegionHausdorffDistance}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/RegionHausdorffDistance.html}", note=[Accessed: 24-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_regionhausdorffdistance, organization={Wolfram Research}, title={RegionHausdorffDistance}, year={2023}, url={https://reference.wolfram.com/language/ref/RegionHausdorffDistance.html}, note=[Accessed: 24-April-2025
]}