code: function(point, curve) {
  		var td = _distanceFromCurve(point, curve);
  		return {point:_bezier(curve, curve.length - 1, td.location, null, null), location:td.location};
  	}
docs: finds the nearest point on the curve to the given point.