WLJS LogoWLJS Notebook

RegionHausdorffDistance

RegionHausdorffDistance[reg1, reg2] gives the Hausdorff distance between the regions reg1 and reg2.

Examples

Hausdorff distance between two disks:

RegionHausdorffDistance[Disk[{0, 0}], Disk[{3, 0}]]
(* 3 *)

Distance between a square and a circle:

RegionHausdorffDistance[Rectangle[], Disk[{2, 2}]]

Distance between two polygons:

RegionHausdorffDistance[
  Triangle[{{0, 0}, {1, 0}, {0, 1}}],
  Triangle[{{2, 0}, {3, 0}, {2, 1}}]
]

Please visit the official Wolfram Language Reference for more details.

On this page