https://1library.net/document/lq5r527z-computing-the-frechet-distance-with-a-retractable-leash.html