optimized bezier interpolation