Implemented cubic interpolation.