Implemented Bezier Clipping algorithm with Python.
This program finds the intersection of a straight line and a Bezier curve.
- Python3.6
- scipy == 1.3.1
- numpy == 1.17.3
- matplotlib == 3.1.1
Execute below command.
python bezier_clipping.py
You will get below images. Red point is intersection.
Result1:
t:0.074 -> (x, y) = [ 0.09929439 -1.76824575]
t:0.595 -> (x, y) = [0.88230049 0.05870114]
t:0.878 -> (x, y) = [1.33648382 1.11846224]
Result2:
t:0.067 -> (x, y) = [ 3.27081548 -3.36609438]
t:0.829 -> (x, y) = [7.00386554 1.4335414 ]