Distance of a point to a curve

The “distance of each point to the curve” depends on the curve’s equation.

For examples fitting an ellipse to a set of data points, see:
${ROOTSYS}/tutorials/fit/fitEllipseTGraphRMM.cxx
${ROOTSYS}/tutorials/fit/fitEllipseTGraphDLSF.cxx