Fit a Curve to Data