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.

Corrected: My use would degree 3 interpolating curves to approximate the bent shape of strips and planks in boats where the curvature is continuous but the rate of change of 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?

My interest: I have wriiten my phd thesis about apprximation with nurbs long ago.So i still like to play around in this field.
1.) So your design intent is to have a nurbs curve which is C1 at the simple internal knots.
this can be achieved by a degree 2 curve with simple internal knots,. or a degree3 curve with double internal konts or … a degree 8 curve with 7-fold internal knots etc etc.
2.) And then you want to have a set of curves defined dover a common knot vector so one can build a surface from the curves which has the same curvature properties along the curves directions?
if 2.) doesnt hold then it does not make sense to serach a soluton for 1.) at all.

Mistake in my previous post: Curvature is continuous at frames/supports but not rate of change of curvature. So I want G2 continuity at the internal knots (not G1 as I wrote above), hence the desire for degree 3 splines with simple knots at specified internal locations.

If surfaces are built using the curves then corresponding curves will have the same knot vectors.

the curves will not share a common knot vector ad hoc. To solve that, the set of curves have to be some kind of ‘uniform’ such that the same knot vector solves all the individual curve interpolations. If there is no such common knot sequence then one can still interpolate a surface through the curves inheriting the geometric properties, but the number of knots and ctrl-pts will be ugly.

Correct, but not an argument against my request for interpolation curves with number of control points equal to number of input points and multispan curves with interior knots on input points. Instead it is an argument against the “Knots=Chord” option and similar which already exist in the InterpCrv and CurveThroughPts commands.