Control point curve to interpolated curve with minimal points?

Is there a way to convert a control point curve to an interpolated curve using least possible points?

What I do is Section part of (badly modelled) surface I need, that gets me a planar control point curve. Than I do Divide->CrvThroughPt, but that goes only so far (lots of points just in order to describe a part with large curvature).

I don’t understand this. Why do you need it? You already have the curve. InterpCrv is a method of drawing a curve based on interpolating it through points. The resulting curve however has control points - like all NURBS curves do.

If you are looking to edit the curve with points that are actually on the curve, turn on Edit Points (EditPtOn).

It’s for ship’s frames. They are defined with exact points, and exclusively interpolated for older ships. Nowadays you see lofted control points hulls all around, but I’m working on something older and want to simplify it a bit. What I have is a really bad 3d model, which I need sectioned out into (as simple as possible) interpolated frames.

The problem is that there is no universe in which those “exact points” are actually exact enough for a curve forced to be built exclusively based on them is going to be anything but a wobbly mess.

Agreed. My question goes along a different line… by hand I can trace the interpolated curve along the control point one and the accuracy is decent ( I’m not looking for precision here, just simplification. The caveat being that I would like this done automatically and with minimum points).

@Jure_Bebić It appears that you have a misunderstanding about control points and curves in Rhino. Every curve in Rhino has control points. That is true if the curve is created by specifying control points directly, sectioning or contouring a surface, interpoloting a curve through a set of points or any other method.

When you say “control point curve” that could be any curve in Rhino. Do you mean a curve obtained by sectioning a surface?

Interpolation is a method of creating a curve by fitting the curve through a set of points. The result of interpolating a curve in Rhino is a curve with control points, as @Helvetosaur tried to explain above. Rhino has two commands for creating curves using interpolation: InterpCrv and CurveThroughPt.

When using InterpCrv the user clicks on the location of points and Rhino interpolates a curve through the points in the order the user clicked on them.

When using CurveThroughPt the user selects already existing points and Rhino orders the selected points and interpolates a curve through the points.

Both commands have Degree= and Knots= options. I recommend using Degree=3. Higher degrees are more likely to cause oscillations in the resulting curve. I recommend using Knots=Chord. This results in smoother curves than Knots=Uniform.

I tried to explain that…

1 Like

@Jure_Bebić I’m going to assume your question is about how to create a smoother curve with possibly fewer control points from an input curve. Here are several methods:

A) Rebuild the curve with Degree 3.
Adjust the Point count to the smallest value which results in the Maximum deviation being acceptable.

B) Divide the curve to obtain a set of points. CurveThroughPt with degree=3 using the points. Because the points are equally spaced the option Knots=Uniform can be used which may have some advantages in later modeling.
CrvDeviation to check the deviation of the new curve with the old curve.
If the deviation is too large redo with more points.
The results of this method are usually very similar to Rebuild.

C) Manually create points along the curve with points closer at areas of tighter curvature. CurveThroughPts with Degree=3 and Knots=Chord using the created points.
CrvDeviation to check the deviation of the new curve with the old curve.
Create additional points if the deviation is too large and create a new curve.
This method has the advantage of allowing the use of fewer points overall while controling deviation in areas of tight curvature.

D) FitCrv command. My exerience with FitCrv is it frequently creates curves with large number of control points. I usually do not use it.

After the new curve is created it may be possible to simplify the curve. To do so use RemoveKnot and select knots where the curvature is low. Watch to see how much the curve changes and be ready to Undo if you don’t like the result.

I edited my post.

Hey David,

Sorry for making you type the entire explanation, my question was unclear. I understand that an interpolated curve is made up of cp’s.
In the image below the yellow curve is a control point curve made of 14 cp’s, above curve is the same curve made of 4 points I hand traced (interpolated) which results in a curve with 6 cp’s.
Since I need interpolation points (positions) my question was if this was possible automatically and with minimal interpolation points.
Method you describe works perfectly but it’s manual. Something similar I found here Interpolate curve automatically with fewest control points using a MaxDev tolerance. - Grasshopper but it concerns min. cp’s instead of interp. points

The easiest method using only Rhino is A) above: Rebuild and adjust the number of points to the minimum number with acceptable deviation. But it is not “automatic” and frequently a few of the knots/control points can be manually removed without increasing the maximum deviation.

If you want to use Grasshopper you might start a new post in the Grasshopper sub-forum here. Ask about how to interpolate a curve with new curve which has fewer control points. Don’t say anything about “contol point curves”. Instead call it the “input curve”.

Be aware that methods for optimizing the location of the interpolation points to minimize the number needed to keep the maximum deviation within a tolerance can be complex, difficult to implement and may not be robust.

1 Like