Cancel
Showing results for 
Search instead for 
Did you mean: 

increase degree of a spline

Genius
Genius
Sometimes I try to INCREASE the degree of spline, e.g. from 3 to 5.
 
Generally I use Fit Curve to do the job. In Fit Curve both ends would be confined by default and I would not do any futher "Specify Constraint" actions. My observation is that the error between the new spline and the original spline is often 0. I wonder whether they are de-facto mathematical equivalents.
 
Thanks for your comments!
4 REPLIES

Re: increase degree of a spline

Siemens Phenom Siemens Phenom
Siemens Phenom

Any spline of degree 3 can be represented exactly as a spline of degree 4 or 5 or any higher degree. So, if you apply any reasonable algorithm for increasing degree, the output curve should be identical to the input one.

 

To understand why, remember that splines are (roughly speaking) just polynomial functions. Suppose we have a polynomial of degree 3, say

 

a*t^3 + b*t^2 + c*t + d

 

I can write this as a (rather strange) polynomial of degree 5:

 

0*t^5 + 0*t^4 + a*t^3 + b*t^2 + c*t + d

 

By this reasoning, every polynomial of degree 3 is also a polynomial of degree 5.

山田
yamada

Re: increase degree of a spline

Genius
Genius

Hi @Yamada   Thank you for the explanation!

Re: increase degree of a spline

Phenom
Phenom
@Yamada,

Does this also mean they will have the same number of segments or knots?
-Tim

Re: increase degree of a spline

Siemens Phenom Siemens Phenom
Siemens Phenom

> Does this also mean they will have the same number of segments or knots?

 

If you use the obvious algorithm, then you get a new spline that has the same number of segments as the old one. The knots have the same values, but the multiplicity of each is increased by one (the "multiplicity" of a knot is the number of times it's repeated in the knot sequence).

 

However, having said this, I'm not sure that NX always uses this "obvious algorithm". I think there are situations where it tries to do something a bit more clever. 

 

One specific case that's important ...
If you take a curve with a single segment (i.e. a Bézier curve), then, when you increase its degree, it will have exactly the same shape, and it will still have a single segment. This is a common technique in class A work -- you start with a curve of degree 2, play with it, and if/when you decide you need more flexibility, you increase its degree. Increasing the degree gives you more poles to play with, but doesn't change the shape, so it doesn't destroy the good work you already did.

山田
yamada