0

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.

Mike 'Pomax' Kamermans
  • 49,297
  • 16
  • 112
  • 153
SailorS
  • 1
  • 1
  • 2
  • question: why would this have anything to do with Bezier curves? A proper sail configuration does not have the sail curl back over itself, it's a normal y=f(x) relation instead of requiring the craziness that is a parametric function representation. – Mike 'Pomax' Kamermans Dec 13 '17 at 17:56

1 Answers1

0

This question (of fitting Bezier in Python) may have already been answered:

Bézier curve fitting with SciPy

Pomax makes a good point; for curve fitting, a simple y=f(x) relation (polynomial, for example) would probably do the job; see numpy polyfit, unless there is a specific reason you need a Bezier.

asylumax
  • 781
  • 1
  • 8
  • 34