This is a sample for Curve Fitting. It uses Cubic Spline Interpolation, and Bezier Spline Curve.
If you can read Chinese, you can refer to my blog post http://haoxiang.org/2011/06/cubic-spline-interpolation-curve-fitting/ and http://haoxiang.org/2011/06/bezier-spline-curve-fit/
Use it as you want :)