Interpolate curve

Dear All

I’m writing here after several years to ask your support.
I’ve n point (5 in the attached image) and I’would like to create an interpolate nurbs curve (4 degree curve) that fit all the best these point.
I’ve tried with the standard command, but basically what GH do is to get the first and last point fixed and fix che curve around the other point.

I wuold ask if is possible to create a curve that also “move” the start and end point also.

Just to understand in the first image in blue you will see the standard result, the dotted line represent the 1 degree curve, the green line what I want.

Maybe the mathematical issue can be minimize the integral between the 2 curves 1 and 4 degree (dotted and green one), or polinomial regression???

Found this

There’s a dll and C# script attached that allow for polynomial regression of any degree and returns the equation.
Don’t forget to right clic > Unlock the dll before opening Rhino.

If you have 5 points, there is a unique 4-degree polynomial fitting those points, so why would you want the green curve ?

There is also the Interpolate component that builds a NURBS (odd degree only) fitting all the points.