Distance queries for parametric curves in 2D and 3D (nearest point, unsigned distance, early-out with speed bounds).