1. Assume we already know the function of curve: y=f(x); Given a point p(x1,y1), calculate the minimum distance:
substitute y by f(x);
Compute the derivative of D* and set it to zero: D*'=0, then we can solve x; substitute x , we get minimum distance D*;
2. The other one is no function expression of curve. We need calculate all points.