Implement bezier curves for calculate_curve