hausdorff-distance-one-sided-extra
function hausdorffDistanceOneSidedExtra(A: number[][], B: number[][], tolerance?: number | undefined, maxIterations: number): HausdorffDistanceOneSidedExtra
Defined in simultaneous-properties/hausdorff-distance/hausdorff-distance-one-sided-extra.ts:61
Calculates and returns an accurate approximation to the one-sided Hausdorff
distance from the bezier curve A to the bezier curve B, together with the
parameter values and points on both curves where the distance is
(approximately) achieved.
- this is the implementation backing
hausdorffDistanceOneSided, which simply returns the.dproperty of this function's result - partially based off Computing the Hausdorff distance between two sets of parametric curves
Parameters:
| Name | Type | Description |
|---|---|---|
A | number[][] | a bezier curve (the 'from' curve) given by an ordered array of its control points e.g. [[0,0],[1,1],[2,1],[2,0]] |
B | number[][] | a bezier curve (the 'to' curve) given by an ordered array of its control points e.g. [[0,0],[1,1],[2,1],[2,0]] |
tolerance | number | undefined | optional; defaults to max(maxAbsCoordinate(A),maxAbsCoordinate(B))/1000_000; if the calculated absolute error bound is less than this, the result is returned; this is not a hard tolerance and the bound can be less accurate in hard cases (due to the maxIterations parameter). Luckily however, specifically the lower bound will be very accurate due to its fast convergence in such hard cases (see the paper) |
maxIterations | number | optional; defaults to 50; if the desired guaranteed error bound has not been achieved after maxIterations then the result will be returned |