9
$\begingroup$

Splitting Bezier curve into two parts at some parameter t is easy thanks to De Casteljau's algorithm.

Is there a similar algorithm for NURBS curves? How to split a NURBS curve?

$\endgroup$
1
  • $\begingroup$ I don't know if it will do the same, but De Boor's algorithm is the equivalent of De Casteljeau. Interestingly, I know you can use De Boor's algorithm to split a NURBS or b-spline into a piecewise Bezier curve. $\endgroup$
    – Alan Wolfe
    Commented Aug 25, 2015 at 14:44

1 Answer 1

5
$\begingroup$

The way that NURBS curves are typically split at an arbitrary point is by knot insertion. You insert knots at the split point until it is at maximum multiplicity, at which point you can just read off the two split curves.

However, you may not want to split at an arbitrary point. If the ultimate goal is to draw the curves or something like that, then it's worth splitting the curve at the existing knot points (that is, performing knot insertion until all knots are at maximum multiplicity) rather than inserting new ones.

This process splits the NURBS into uniform rational B-splines. Once you have that, you can use de Boor's algorithm to split further.

The number of knots in the knot vector is:

numKnots = degreeOfCurve + numControlPoints + 1

or if you prefer:

numKnots = orderOfCurve + numControlPoints

Inserting a knot thus increases the number of control points by one.

As you travel along a NURBS curve, each knot represents a place where one control point "drops out" and another one "enters". If a knot value is repeated, this means that more than one control point is replaced at this place.

For a curve of degree greater than 1, the and last knots are repeated multiple times for one simple reason: you need to bring in more than one point to start and you need to eject more than one point to end.

Let's think about cubic curves for the moment, just to keep things simple.

A curve with the knot vector [0,0,1,1] is a uniform B-spline curve.

A curve with the knot vector [0,0,1,1,2,2] is non-uniform, but can be thought of as two uniform B-spline curves which connect at t=1, one corresponding to [0,0,1,1] and one corresponding to [1,1,2,2]. You can do this because the multiplicity of the knots is enough to "start" and "end" a cubic curve.

If you're faced with a curve with a knot vector like [0,0,1,2,2], you can insert a knot at 1 without changing the shape of the curve (this is the knot insertion procedure). This increases the number of control points by one; the knot insertion procedure adjusts the points around the new knot to accommodate it. But once you've done that, you have two uniform B-spline curves.

Knot insertion won't create overlapping control points unless you insert too many knots at the same place, and by "too many", I mean the degree of the curve. So for a non-uniform cubic curve, you'd insert knots so that every knot had multiplicity 2. That gives you a number of abutting uniform cubic curves, which you can then use de Boor's algorithm to split further.

$\endgroup$
4
  • $\begingroup$ I'm sorry I'm very new to NURBS: what do you mean by "maximum multiplicity"? I mean, when I do it in the former way, do I end up with multiple overlapping control points? $\endgroup$
    – Ecir Hana
    Commented Aug 26, 2015 at 22:03
  • $\begingroup$ Let me try to explain in the answer. $\endgroup$
    – Pseudonym
    Commented Aug 27, 2015 at 1:20
  • 1
    $\begingroup$ Pseudonym err no not a good knot vector to demonstrate this. I See thet i might need to expand the other post. Altough @EcirHana it might be a good idea to ask what a multilicity is. $\endgroup$
    – joojaa
    Commented Aug 27, 2015 at 9:03
  • $\begingroup$ You're probably right about that @joojaa. $\endgroup$
    – Pseudonym
    Commented Aug 27, 2015 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.