Example 39



SweepDist


Peano vs dragon (curves)
Curves # Vertices Length
P 82 8.999999999999984
Q 1024 15.548636593338594

Distance Value Iters Time (s)
Fréchet, exact (frechet_c_compute_exact) 0.6989247311827922 0.00511
Fréchet, within 1 + 10-5 (frechet_c_compute) 0.6989247311827954 0 0.00543
VE Fréchet (frechet_ve_r_compute) 0.6989247311827954 124966 0.0113
Times are wall-clock seconds of one run, single-threaded, on the machine that built the gallery (after compilation).

Animation: Fréchet morphing

This is the animation of the morphing computed that is both continuous and monotone.


Animation: VE Retractable Fréchet

This is the animation of the VE retractable morphing. It is potentially not monotone (but it is continuous.


Free space diagram heatmap:


VE-Fréchet Retractable solution:


Monotonized...

Fréchet cont+monotone solution:


Discrete Fréchet

The resulting morphing - extended to continuous:

Specifically, to get a smooth animation, the leash is shown as moving continuously, by interpolating between the discrete locations.


The discrete retractable version


The discrete dynamic time warping


P # vertices: 82
P # vertices: 1024
DFréchet iters : 83968
Retract DFréchet iters : 61941

Refinement for removing monotonicity

By introducing vertices in the middle of parts of the curves that are being traversed in the wrong direction, one can refine the solution, till effectively reaching the optimal monotone solution. This process is demonstrated below. As one can see, the error is negligible after a few (say four) iterations. After that, it becomes a bit pointless.
We emphasize that a monotone morphing can always be extracted, by monotonizing the current solution. This is easy and fast to do, and is the error accounted for in the below graphics.

More info

Animation: Fréchet morphing as morphing


2026-11-28 14:16:02