this formula is easy to implement even if you don't understand it:
http://en.wikipedia.org/wiki/Cubic_Hermite_spline