public PointOnPath ClosestPoint(Coordinates pt)
 {
     CubicBezier.NearestPointResult npr = cb.GetClosestPoint(pt);
     return(new PointOnPath(this, cb.PartialArcLength(npr.tval), npr.NearestPoint));
 }