Modify Bezier curve inputs to fit set of points

A client has asked me to implement the process for creating airfoils shown here -
https://www.researchgate.net/publication/321111149_Parametric_wing_profile_description_for_conceptual_design

He also requested that I need to be able to match existing airfoil point data as close as possible. I created a test Grasshopper program that allows me to adjust a Bezier curve by modifying the start and end tangent vector lengths and the angle of the start tangent vector in order to approximate the point set. I also set it up to limit the length of the tangent vectors to prevent the curve from overshooting the end points.

What I need help with is a method to automate adjusting the tangent inputs to fit a set of points. I can do this manually, which is why I added a RMSE calculation, but it is basically just guessing at which inputs I need to modify.

I looked at both Hoopsnake and Anemone to see if they would be helpful and really got nowhere with that approach.

Any ideas or suggestions would be appreciated.

Chris

Here is a picture of my geometry with the curve and point set.

Chris

I forgot the Grasshopper code -
Bezier Curve thru 2 lines.gh (15.8 KB)

Like this?Bezier Curve thru 2 lines_ME.gh (13.6 KB) Just done with Galapagos.

1 Like

Perfect, thanks !

Chris