# Talk:Non-uniform rational B-spline

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

## Inline citations

I have added some inline citations to relevant sections from two of the main reference books ("The NURBS Book" and "An Introduction to NURBS with Historical Perspective") supporting the following aspects:

• Invariace of NURBS surfaces under affine transformations
• Construction of basis functions
• Definition of a NURBS curve
• Manipulation of NURBS curves

Nedaim (talk) 21:07, 5 March 2010 (UTC)

## Image Caption

Excuse my ignorance - NURBS are new to me - but shouldn't the caption for the second image be "A three dimensional NURBS surface" rather than "A two dimensional NURBS surface"? The surface and its control points are defined in 3D space rather than 2D. If the 2D caption is correct, perhaps an explanation of the 2D/3D terminology [as it applies to NURBS] is justified. ScottColemanKC (talk) 13:53, 6 January 2009 (UTC) Good catch --SmilingRob (talk) 05:20, 28 January 2009 (UTC)

## B-Splines vs. Bézier Splines

I'm not sure I like the identification "NURBS (Non Uniform Rational Basis, or Bézier Spline)" in the History section. A Bézier spline is a special case of a B-Spline; for example, a degree 3 Bézier spline on four control points is the same as a B-Spline with knot vector [0,0,0,0,1,1,1,1]. But I don't think it is standard to regard the B in "NURBS" as standing for "Bézier." See, for example, 3-D Computer Graphics: A Mathematical Introduction with OpenGL, by Samuel Buss, Chapters 7-8. I think it would be better to replace the above quote with simply "NURBS (Non Uniform Rational Basis Spline)". Verdanthue (talk) 23:33, 2 April 2008 (UTC)

I agree. Bezier splines have no internal knots, which rules out Non-Uniform-ness. Bringing them together in one

term makes no sense. I will follow your suggestion. Mauritsmaartendejong (talk) 20:55, 5 April 2008 (UTC)

## Continuity again

I propose to remove the discussion on continuity within the article by splitting it in two distinct parts (and putting it in a separate section). The C0, C1, ... etc definitions relate to parametric continuity and require the derivatives of the curve with respect to the parameter to be continuous. G0, G1, ... definitions relate to geometric continuity, which I think is equivalent to parametric continuity provided that the parameter exactly represents the length of the curve -- which is hard to achieve in practice. In modeling, geometric continuity is usually a requirement. Parametric continuity is a bonus, e.g. if rendering can use parameter space directly for tesselation. Two separate NURBS curves which are not Cn continuous can be Gn continuous. For instance, two linear NURBS segments with different knot spans but collinear control points will show G1 continuity. Mauritsmaartendejong (talk) 15:11, 6 January 2008 (UTC)

## Double knots in the circle example

"(In fact, the curve is infinitely differentiable everywhere, as it must be if it exactly represents a circle.)"

This is true in the geometric sense, is it true in the parametrized sense? Isn't it true that two rational functions which agree in all derivatives in some point must be identical, like it holds for polynomial functions? But here we definitely have pieces with different functions on successive intervals. Someone should do the calculations to check this.--130.133.8.114 (talk) 13:01, 30 June 2010 (UTC) G. Rote

Addition. I checked: the 2nd derivatives of the spline curve are not continuous. --130.133.8.114 (talk) 18:29, 30 June 2010 (UTC)

## Clarification on the Number of Knots

"The number of knots is always equal to the number of control points plus curve degree minus one."

I urge the athor to expand his or her explanation of this relationship but I do not personally feel qualified to make these changes. I spent some considerable time on this issue and still am not clear on what the proper relationship should be. Using the Forenik tool, which is by the way very cool, referenced in the article I deduced that nKnts = nPts + nDeg + 1 whereas the article states that nKnts = nPts +nDeg -1. To me this implies that there is some confusion over whether the ends are or are not knots. In addition the number of knots issue needs to be clearly differentiated from the subject of end point multiplicity. To the casual reader multiplicity apparently reduces the number of knots.

And thanks much for this article. Between this article and the Forenik tool, I now have a very good understanding of NURBS. — Preceding unsigned comment added by Petyr33 (talkcontribs) 18:28, 21 February 2013 (UTC)

## Number of Knots per Control Point

Quote from the text (from the section on Knot Vector): The number of knots is always equal to the number of control points plus curve degree plus one.

Shouldn't it be: ...always equal to the number of control points minus curve degree plus one..

Example: A cubic NURBS curve with 4 CPs has got 2 knots: 4 – 3 + 1 = 2 —Preceding unsigned comment added by 193.170.135.17 (talk) 11:05, 2 December 2007 (UTC)

No. If a cubic curve with four control points has two knots, they have multiplicity 4, bringing the total number of knots to 8 = 4 + 3 + 1. The multiplicity of the boundary knots causes the curve to be clamped to the first and last control point. See also property P3.2 in chapter three of Piegl and Tiller Mauritsmaartendejong 12:56, 2 December 2007 (UTC)

In my opinion the total number of knots (counted with multiplicity) should be equal to the number of control points plus degree minus 1. Exampled: degree=d=1 (order=2). These are just polygonal chains through the control points. clearly we don't need more knots than control points. And to get the curve starting at the first control point, we don't have to repeat the first knot more than d=1 times. (The first and last knot in the circle example should be deleted. Multiplicity 2 is enough (I did the calculation).)

It isn't a matter of opinion or of 'needing extra knots' to clamp the end points, it is a matter of how NURBS are defined! It is part of the mathematical definition of a NURBS curve that (including multiplicities) num(knots) = num(CPs) + order (CP is control point). Since order = degree + 1, the above CP+degree-1 formula runs counter to the definition of a NURBS curve. The correct definition ensures each CP has a 'fair chance' at the right number of knot spans. Consider that the number of knot spans affected by a CP is equal to the order (this is a consequence of the way the basis functions are defined). Consider a minimal cubic NURBS curve with 4 CPs: it is expected that the middle knot span is the only one affected by all 4 CPs. Also, since order=4, we know the first CP affects exactly the first 4 spans. So the last of those 4 spans must be the middle one! So, there is a middle span and three spans on either side, for a total of seven spans, or eight knots. This fits the +1 version of the definition. If we took off two spans on either end to fit the -1 version, then we'd lose the spans that are affected by only one CP! Note that all of this counts multiplicities as additional knots; a multiplicity just results in a 'degenerate' span, i.e., one with a zero-length interval in parameter space. --Migilik (talk) 05:20, 13 June 2013 (UTC)

In general, the first d knots can also be distinct, but the curve will then not start at the first control point (it will start only (d-1)/2 "steps" later. --130.133.8.114 (talk) 18:51, 30 June 2010 (UTC) Günter Rote

Maybe the sentence should be refrased. All in all, I'd say it would be misleading to say that number of knots (NK) is ALWAYS equal to the number of control points (NCP) plus degree (DEG) minus one, because in most cases clamped curves have number of knots equal to the order at the ends. For cubic curves this means NK = NCP + DEG + 1 <=> 8 = 4 + 3 + 1 (Toivo83 (talk) 06:11, 2 November 2011 (UTC))

'misleading' is an understatement. NK = NCP + DEG + 1 is the correct form for all NURBS curves (regardless of whether the common 'open uniform' knot vector is used), and having NK = NCP + DEG - 1 in the article will likely cause serious confusion for people new to the field. --Migilik (talk) 05:20, 13 June 2013 (UTC)

## Parameterisation ratio

Also note that the only significant factor is the ratio of the values to each other: the knot vectors [0 0 1 2 3], [0 0 2 4 6] and [1 1 2 3 4] produce the same curve.

Er, I've got a problem with the ratios (0:1 = 0:2 = 1:2) and (1:2 = 2:4 = 2:3) which is what this states. I can only conclude that the minimum value is also a significant factor. Can anyone help me out on this one?

The only significant thing is the ratio of neighboring parameter values in their ascending order, therefore the given example is correct. Minimum value has no significance. As long as a multiplier value exists to make ratio between different parameter values the same, the resulting b-spline curve will be the same.

E.g. 0 1 2 3 4 is the same as 0 2 4 6 8 (multiplier being 0.5)

or

0 3 6 9 12 is the same as 0 0.25 0.50 0.75 1.0 (multiplier being 12)

Actually for any uniformly increasing parameter values, curves with same control points position and same number of knot vectors will have the same shape (which means that all four above examples give identical curve shape provided their control points positions are the same).

For non-uniform splines:

0 0 1 3 4 5 is the same as 0 0 0.5 1.5 2.0 2.5 (multiplier is 2)

It is those differences in parameter values that determine chord length and affect the resulting curve shape. Therefore, same ratio between knot parameter values, combined with same control points positions will give the same curve. Think of it as a tension increased in one knot by any factor will not change the curve if the same factor of increased tension is applied to all the other knots.

The text doesn't make clear that changing the knot vector by a constant multiple will change the parametrization of the curve. The curve will be the same shape, but it will be different as a parametric function of u. Verdanthue (talk) 23:11, 2 April 2008 (UTC)

## Uniformed circle?

Can someone explain what a "uniformed circle" is? --Doradus 03:21, 5 February 2006 (UTC)

I asked myself the same question. I think it's a typo, and should be 'uniform circle', which I think is a circle that will give equidistant points when the parameter space is uniformly traversed. As an aside, the table needs an order and a knot vector before it really defines a uniform circle. The order is three, and the knot vector something like {0,0,0,1,1,2,2,3,3,4,4,4} Mauritsmaartendejong 20:38, 19 June 2007 (UTC)

## Picture

This article could do with a picture in as much as NURBS is an adjective to describe a class of shapes, particularly shapes of consumer products of recent years. —BenFrantzDale 16:46, 16 February 2006 (UTC)

Well, its kindoff hard and simple at the same time. See more is about the specifications of the image, i mean you could photograph any mobile telephone, or any western airplane. But more of the trouble here is to make a piucture that is MEANINGFULL for the potential viewer. See when i take a look at my telephone i know what im looking for so i can see how the patch layout is done. But the untrained person will most definetly not see it unless pointed out, and even then if the designer of the phone did a superb job there would be noothing to see. Just imaginary lines. So its definetly going to have to be a rendering.

Now to complicate this a bit, most eingeneering applications make use of as many independent pieces of trimmed nurbs surfaces that most noneingeneers wont believe. -J-

## Subs versus nurbs

the following line needs editting:

Subdivision surface modeling is now preferred over NURBS modeling in major modelers because subdivision surfaces have lots of benefits.

Because it is simply untrue. Or it would be true if a modelling packge could be clearly demonstrated not to include cad packages, and/or if cad packages would be very specialized minority. But the simple truuth is that theres more cad users on nurbs out there than theres DCC visualisers with subdivision surface modellers. And yet no cad package has switched over to subds. Because theres NO 2 degree continuity... And the tools are severely lacking form engeneerig perspective. -J-

I do completely agree as this is more or less opinion. It implies that nobody uses NURBS any more and instead uses Subs. NURBS do have important advantages compared to Subs and therefor all mayor animation packages contain a NURBS engine. Opinions about Sub Division Surfaces beeing "better" belong to the appropriate page only. -R-

## Miswording

When describing the alternative definitions for C0 through C2 (right after they are introducted) the following claim is made.

This definition is also valid for curves and surfaces with base functions higher than 3rd order (cubic). It requires that both the direction and the magnitude of the nth derivate of the curve/surface (d/du C(u)) are the same at a joint. The main difference to the definition above is the requirement for a same order of magnitude.

It sounds like whoever wrote this is confusing same 'order of magnitude' (roughly the same value) with having the same value. If not one of the definitions is stated incorrectly as nowhere do they require same order of magnitude. The order of magnitude bit appears in the next sentence as well.

I'm pretty confident that 'same magnitude' is what was intended from textual clues and my knowledge of the mathematical notions so I'm going to change it but I'm just learning about computer graphics so if I got it wrong please correct my error. In either case once a person who knows the facts comes along and reads this and the page over this comment will become superflous.

Logicnazi 09:17, 19 June 2006 (UTC)

Yes i changed magnitude in the first explanation to the word length, magnitude however does mean the same thing for a vector (magnitude of a vector is its exact length, so all vectors of same length have same magnitude). But for the readability its indeed better to use the word length. Because its a more understandable wording -J-

Edity, i think the entire section of C0 C1 and C2 continuity should be revised fully, indeed C0 continuity implies end points matching, C1 is matching the vector of change direction and C2 is matching vector length change. So it is NOT enough to be same length but the rate of change must also be a continuous function (remember we are talking of function continuation here)

So simply, c0 ensures that the curves continue seamlessly, c1 ensures the angles the same, c2 ensures change of rate is continuous. -J-

PS i was talking to a engineer who needed c3 continuity because of some stress calculational reason.