I know there has been a lot of topics about curve fitting here but I have not found anything that would suite my needs.
I'm trying to make a simple sail analysis app with python. The code "calculates" sail shape stripe and calculates some data from it but I cannot get the correct "entry angle" and "exit angle" as they are defined by the curve control points.
See ref image:
So my existing data is in form of x,y points and i would like to fit bezier curve to the existing data so I could calculate the entry and exit angles. I might also be possible to fit b-spline to the existing data but either way it should be so that the "mid point" and points next to it either side has same y-value.