Rational Bezier Curve Python Code