Needed: Curve through points with # of CPs = # of input points

I need to create curves through sets of input points with the number of control points equal to the number of input points. Also for multispan curves the divisions between spans need to aligned with input points or midway between input points.

This is what SrfPtGrid does for surfaces. I need the analogous capability for curves. [Correction: SrfPtGrid does not put the divisions between spans on input points in general.] Neither InterpCrv, CurveThroughPt nor CurveThroughPolyline does this.

Hi David - CrvThroughPt with the CurveType option set to ControlPoints and not Interpolated… is that getting it? Hm - I guess not, sounds like you need interpolated. DupEdge on a SrfPtGrid?

-Pascal

No, I need an interpolated curve.

put SrfPtGrid does not interpolate, you simply give he coordinates of ctrl pts:
http://docs.mcneel.com/rhino/5/help/en-us/commands/srfptgrid.htm

So what is your input data: points on the curve or ctrl poins of the curve?

Hello -
“The SrfPtGrid command draws a surface from a grid of points that lie on the surface.”

you may be thinking of

“The SrfControlPtGrid command draws a surface from a grid of points that represent surface control points.”

-Pascal

Points on the curve.

@pascal Any possibility that the capability I requested could be added?

Or do I need to write my own plug-in using the basics of NURBS? I haven’t done any serious coding in thirty years.

Correction: SrfPtGrid does not put the divisions between spans on input points in general.

Can you post an example set of points? Having the internal knots of the spline ‘at’ the input points might trigger huge oszillations in the rest of the curve (depending on distribution of points)

Example set of points. Example Point Set.3dm (55.6 KB)

My experience is oscillations from fitting a spline to a set of points are more a function of parameterization than where the knots are relative to the input points. If the parameters assigned to the input points (either explictly or implicitly) differ greatly from the chord distance between the points then oscillations are more likely. An example is using uniform parameter increments between points when the points are not close to uniformly spaced.

I need the ability to use chord distance or other non-uniform parameter spacing for the knots and input points.

please see the notes in the example.cockney-curve.3dm (59.0 KB)

Question in notes in example from @stefan.schmaelzle:
it has 5 internal knot values, but the point-set has 7 internal data points.
how should one decide which 5 of the 7 points should become ‘at knot’?

My answer for the specific example which is a degree 3 curve: If the points are numbered 0 through 8 with points 1 through 7 being interior points then points 2 through 6 are located at knots.

In general for odd degree multispan interpolating curves of degree d with n points numbered 0 through n-1 and n greater than d+1: Points (d+1)/2 through n-1-(d+1)/2 are located at knots.

Even degree curves are somewhat problematic because the points located at knots cannon be “symmetric”. On possibility for even degree interpolating curves is to locate the interior points mid-way between knots in parameter space.

PS My last name does not contain an “n”.

soorry for the additional ‘n’ in yout name,. but leaving out the rist and last point-1 doesn look a bit weird.
how to deal then with degree 4,5,6,7,8?

As I suggested above for odd degree (such as 3,5,7) multispan interpolating curves of degree d with n points numbered 0 through n-1 and n greater than d+1: Points (d+1)/2 through n-1-(d+1)/2 are located at knots.

Even degree curves (such as 4,6,8) are somewhat problematic because the points located at knots cannot be “symmetric”. CurveThroughPt (Interpolated) does not allow even degree interpolating curves (degree 2,4,6). One possibility for even degree interpolating curves is to locate the interior points mid-way between knots in parameter space

And what is the ‘usage’ of this solution?
Why do want to have curves interpolating some points at knots?
Whats the geometric benefit of doing so?
Do you want to create surfaces out of a set of such curves? then the curves have to be constructed using the same knot distribution to avoid ctlr-pt insertion avalanches for the interpolating surface. This makes a solution even harder.

My use would degree 3 interpolating curves to approximate the bent shape of strips and planks in boats where the curvature is discontinuous at the frames / supports, hence the knots at the input points…

True anytime surfaces are created from curves independent of the algorithm which created the curves.

@stefan.schmaelzle What is you interest in this topic?