pragmatic cubic and linear interpolation