spline based distances