Talk:B-spline

Old stuff
The definiton of B-spline is not correct:
 * 1) Knots may repeat, i.e. t_i <= t_{i+1}, not t_i < t_{i+1} as article states.
 * 2) S(t) domain is [0,1], but B-spline is defined in range [t_n, t_{m-n-1}] and thus additions are done across indexes i=0..m-n-1, not i=0..m.
 * 3) Since knots may repeat, denominators appear in de Boor-Cox formula, i.e. t_{i+n}-t_i and t_{i+n+1} - t_{i+1} may eqaul zero. In such cases certain part of sum just disappear.
 * 4) Count of control points is limited: n = m-k-1, where k is a degree of curves, and n is a max index of P.

And two notes:
 * 1) The full name of Cox-de Boor formula is "Mansfield-de Boor-Cox".
 * 2) B-spline is a shotening from "basis spline function", thus "basis B-spline" means "basis basis spline function" and it is quite redundant.

I am not native speaker, so I haven't touched the article. Someone, please consider my remarks.

The matrix form of the uniform B-splines may not be correct. If the basis formula is derived from the Bernstein polynomial, then the correct cubic matrix is [-1 3 -3 1; 3 -6 3 0; -3 3 0 0; 1 0 0 0].

An excellent reference for B-splines & Bezier curves is G. Farin's Curves and Surfaces for Computer Aided Geometric Design Academic Press, 4th ed. 1994 (I don't know the correct way to add a book reference.)

--


 * The sum should be over all points, not just 0 to "m-n-1". The reason is trivial: If the points are not included in the sum, they have no effect on the curve at any value of t. Fyo 20:20, 3 July 2007 (UTC)


 * Unless anyone objects, I will change the nomenclature used in this article to reflect the majority of bspline texts: n is the number of control points -1, k is the degree and m the number of knots (the article currently uses n as the degree). While p is also commonly used to denote degree, my experience is that students tend to confuse it with the capital P used for the control points. Since "k" is also used quite often in the literature, this would be my preference. Fyo 20:20, 3 July 2007 (UTC)

The definition of B-spline at the top, as a function into the plane, is not consistent with most of the rest of the article, where B-splines are real-valued. The definition doesn't need to be the most general, but should cover common cases at least, so whoever fixes the other points, could you have a look at this, too? Possibly a simple definition with references for variants? Reidhuntsinger (talk) 20:53, 29 April 2010 (UTC)

OK, I misunderstood. Maybe distinguish between a "B-spline curve" (the first instance of B-spline) and a B-spline? Note that the former is often referred to as a B-spline, too. Define a spline as a linear combination of B-splines, then point out that a "B-spline curve" is just a pair of splines t -> (f(t),g(t)). Reidhuntsinger (talk) 21:03, 29 April 2010 (UTC)

Blending Function
What is the exact definition of a blending function?--SiriusB 08:18, 5 September 2005 (UTC)

Changing the degree
I am not an expert on this - but the degree in the Cox-deBoor recursion looks out by 1. I will change (change back if you object) Michael Kemp. —Preceding unsigned comment added by 137.166.4.130 (talk) 00:37, 26 September 2008 (UTC)

Uniform quadratic B-spline
I think there is some information missing to make this comprehensible for people that (like me) are new to B-splines:


 * $$b_{j,2}(t) = \begin{cases} \frac{1}{2}t^2 \\ -t^2 + t + \frac{1}{2} \\ \frac{1}{2}(1-t)^2  \end{cases}$$

After quite some time of thinking I think to have found out that the parameter t is $$\in [0,1]$$ for all three segments, while in the form that constant and linear B-splines are given in, t does not "jump" from 1 to 0 at the segment borders. Am I right? If so, this should definitely be clarified. --Zupftom (talk) 12:36, 1 May 2009 (UTC)

P.S.: It is said that the B-spline given in the above form is uniform, but this doesn't say anything about the distance between two knots, right? —Preceding unsigned comment added by Zupftom (talk • contribs) 12:43, 1 May 2009 (UTC)

How useful would a higher-order uniform B-spline be?
D. Salomon's book "Computer graphics and geometric modeling" has some higher-order basis matrices worked out...

For example, the quartic spline:

$$ \cfrac{1}{4!}\begin{bmatrix} 1 & -4 & 6 & -4 & 1 \\ -4 & 12 & -12 & 4 & 0 \\ 6 & -6 & -6 & 6 & 0 \\ -4 & -12 & 12 & 4 & 0 \\ 1 & 11 & 11 & 1 & 0 \end{bmatrix} $$

Any value in putting this on the article (or at least referring to the book) ?

--Immer in Bewegung (talk) 06:06, 21 May 2009 (UTC)


 * IMO I wouldn't copy the matrix into the article. But a mention that quartic splines are used in computer graphics (or wording supported by that book), with that ref given, might be a good addition to the article.  After all, nearly all splines used are cubic (or less).

Propose this be split into two articles
I propose that this article be split into two articles, one pertaining to the use of the term "B-spline" to refer to a curve, the other pertaining to the use of "B-spline" to refer to a mathematical function.

"Spline" already has a disambiguation page. It seems to me that "B-Spline" needs one too, for parallel reasons. Dratman (talk) 21:28, 24 January 2011 (UTC)


 * Has there been a discussion of a problem that this is a solution to? I don't see it.  I don't quite get the distinction you're making; can you explain and point out sources for the different interpretations? Dicklyon (talk) 21:39, 24 January 2011 (UTC)

B-spline name
Isn't B in B-spline just from name Bazier. It is just like linear, quadratic, qubic splines have in each interval linear quadratic or qubic form, similary in B(azier)-splines in each subinterval we have a Bezier function (which is a function of basis polynomials aka Bernstein basis functions). So who and why, call B-splines a "basis splines" ? I do not get it, and I'm not sure if this is correct. —Preceding unsigned comment added by 149.156.82.207 (talk) 19:13, 7 April 2011 (UTC)


 * The relation of "basis spline" to Bezier curves is covered in many books. Dicklyon (talk) 20:30, 14 August 2011 (UTC)

In de Boor's "A Practical Guide to Splines" (2001), chapter IX, p 99, he has a section titled "B stands for basis", and makes it clear that Bezier splines are a special case of B-splines. — Preceding unsigned comment added by Eigenjohnson (talk • contribs) 14:34, 7 March 2020 (UTC)

Correctness of definition
I have two objections with the definition of the B-Spline. Firstly, the article states $$\mathbf{S}:[t_0, t_{m-1}] \to \mathbb{R}^3$$, but the next formula states $$\mathbf{S}(t)= ... \mbox{, } t \in [t_{n},t_{m-n-1}]$$. Isn't this inconsistent? Please clarify.

Secondly, consider the following B-Spline: Degree n=1, p=2 points, thus m=p+n+1=4 knots. Let the knot vector be (0,0,1,1), thus t in [0,1]. For t=1 however, both $$b_{0,1}$$ and $$b_{1,1}$$ evaluate to 0 according to the definition in the article. What is the problem? In particular, $$\lim_{t\rightarrow1}b_{1,1}(t) = 1$$ but $$b_{1,1}(1) = 0$$.


 * $$b_{1,1}(1) = \frac{1 - t_1}{t_2 - t_1} b_{1,0}(1) + \frac{t_3 - 1}{t_3 - t_2} b_{2,0}(1) = \frac{1}{1} b_{1,0}(1) + \frac{0}{0} b_{2,0}(1) = b_{1,0}(1) = 0$$

SimonFuhrmann (talk) 20:18, 14 August 2011 (UTC)


 * I believe the first interval should be changed to match the second, since there's not enough info to define the spline near the ends where you don't have enough knots for the order. And your knots are too degenerate for order 1, leading to division by zero.


 * But why is it even talking about $$\mathbb{R}^3$$ instead of amore general point space; doesn't it work just as well in 2D, 1D, and 4D? Dicklyon (talk) 20:48, 14 August 2011 (UTC)


 * I agree that $$\mathbb{R}^3$$ should be a more general space --- I changed this to be $$\mathbb{R}^d$$. I also changed the domain of $$S(t)$$ to be $$[t_{n},t_{m-n-1}]$$. The problem with the basis polynomials that are all zero for $$t=t_{m-n-1}$$ is, however, more serious. It does not only happen for knots that are "too degenerate for order 1", it happens for all orders. So the domain of the spline should either be limited to $$[t_{n},t_{m-n-1})$$, or should be relaxed to $$\mathbb{R}$$ with the comment that the basis polynomials are >0 only in $$[t_{n},t_{m-n-1})$$. The same goes for the last sentence before the "uniform b-spline" section, where the "limited subrange" should be $$t_{j'{+}n} \le t < t_{j''{+}1}$$. The reason for this is that the "linear support", i.e. the $$b_{i,0}$$ functions, are only defined in $$[t_{n},t_{m-n-1})$$. --SimonFuhrmann (talk) 14:40, 15 August 2011 (UTC)


 * I'm a bit confused about the domain of $$S(t)$$. As I read it, $$t\in[t_{n},t_{m-n-1}]$$ means that $$t$$ can be drawn from anywhere in between $$t_{n}$$ and $$t_{m-n-1}$$, where $$n$$ is the degree of the B-spline, and $$m$$ is the number of knots. Assuming this is the case, it doesn't seem to work properly: for example, if we had a spline of degree $$n=3$$ with $$m=6$$ knots, this would yield $$t\in[t_{3},t_{2}]$$, which doesn't make sense. Should it instead be $$t\in[t_{n},t_{m-1}]$$, giving a total of $$m-n-1$$ knot spans? ProframFiles (talk) 08:39, 8 July 2012 (UTC)

Cardinal splines confusing
Is it true that a cardinal spline is a b spline? Just that we assume that consecutive t_i's have distance 1? I think a remark along those lines in the text would really help understand it. 12.25.180.20 (talk) 22:57, 13 June 2013 (UTC)


 * This article covers the "cardinal b-spline" (which has uniform spacing like you write), but there are other splines which include the "cardinal" name. Unfortunately this is kinda confusing and I personally wouldn't mind clarifying it in the text, but many spline articles should include such clarifications the as well. 2A02:908:1866:5B00:6583:DFF9:E55:9DDE (talk) 15:29, 22 May 2018 (UTC)

Major revision
I have done a major revision of this article which was rather confused. In particular, the bits pertaining to computer graphics are now in a separate section. I have had to delete statements such as "Put in matrix-form, it is:
 * $$ \mathbf{S}_i(t) = \begin{bmatrix} t^2 & t & 1 \end{bmatrix} \frac{1}{2} \begin{bmatrix}

1 & -2 & 1 \\ -2 & 2 & 0 \\ 1 &  1 & 0 \end{bmatrix} \begin{bmatrix} \mathbf{p}_{i-1} \\ \mathbf{p}_{i} \\ \mathbf{p}_{i+1} \end{bmatrix} $$ for $$t \in [0,1], i = 1,2 \ldots m-2$$". because If someone can provide an acceptable verification source, it could be re-instated into the section on computer graphics, but it will need further explanation (e.g. uniform knots) and perhaps a revision of the terminology. Petergans (talk) 17:25, 13 August 2013 (UTC)
 * 1) citing a web-site is not sufficient for verification
 * 2) there is no reference to any such formula in Non-uniform rational B-spline, though it is clearly related
 * 3) I don't know of a book which could be used to verify the formula (I'm not sufficiently knowledgeable about computer graphics).

Definitions of functions
It is not clear what the domains and ranges of any functions defined in this article are. The standard notation is to denote a function f with domain A and range B by $$ f : A \rightarrow B $$. Please adhere to this. — Preceding unsigned comment added by 128.32.92.238 (talk) 20:28, 23 September 2013 (UTC)
 * The notation follows that in de Boor's book. The domain of a B-spline is clearly stated in the first sentence of Definition. BTW, non-mathematicians will not understand the notation $$ f : A \rightarrow B $$. Petergans (talk) 08:57, 24 September 2013 (UTC)

Very confusing Definition section
I find the definition section highly confusing and little illuminating! The problem is that it is completely unclear why the basis sometimes has 1, sometimes 2 and sometimes 3 subscript indices. It would be great if someone could make that a bit more rigorous. (22. Jan 2014) — Preceding unsigned comment added by 149.217.40.222 (talk) 13:54, 22 January 2014 (UTC)

Derivative
The formulae in the section on derivative expressions have a factor of k-1. This would seem to suggest that the derivative of a B-spline of degree k=1 is identically equal to 0. But surely that can't be true. I suspect that the source for these expressions uses indexing starting from k=1 whereas this article uses indexing starting from k=0. Does anyone object if I change the k-1 to k? Ossi (talk) 14:48, 30 March 2014 (UTC)
 * I have put in the summation limits, copied from de Boor eqn. 11b, p139. Petergans (talk) 09:42, 1 April 2014 (UTC)
 * I wasn't talking about the summation limits. I was talking about the degree k of the splines. It seems de Boor uses the convention that the lowest degree splines have k=1, whereas this article uses k=0. Do you disagree? Do you object if I change the k-1 into k in the formulae? Ossi (talk) 23:29, 2 April 2014 (UTC)
 * I have used de Boor's book as the main source for my contributions, so I don't understand how there is an inconsistency. I'm not expert regarding the maths, but have published an application (P. Gans and J.B. Gill,"Smoothing and differentiation of spectroscopic curves using spline functions", Applied Spectroscopy 1983, 38, 370 375 for which I used the computer code in the book. If there is an issue with the degree of the spline, it needs to be stated explicitly, where appropriate. I don't think that there is an issue, as a piece-wise polynomial of degree 0 is simply a set of constants and that is not a spline function as it does not have any continuity property at the knots. Petergans (talk) 09:30, 4 April 2014 (UTC)
 * "I have used de Boor's book as the main source for my contributions, so I don't understand how there is an inconsistency."
 * There's inconsistency because it seems that de Boor and this article use a different convention regarding whether the index k starts from 1 or 0.


 * "I don't think that there is an issue, as a piece-wise polynomial of degree 0 is simply a set of constants and that is not a spline function as it does not have any continuity property at the knots."
 * The base case for B-splines is a piecewise constant polynomial as you can see the definition. The issue is whether we say that k=0 or k=1 for these. De Boor seems to use k=1 and this article seems to use k=0 (except in the derivative section). Both conventions are fine, but one should not mix them. Does this clarify the issue for you? Ossi (talk) 11:40, 4 April 2014 (UTC)

I don't understand where k=0 is supposed to be implied.Petergans (talk) 12:40, 5 April 2014 (UTC)
 * I mean, using this article's definition: k = polynomial degree. Using de Boor's definition: k = polynomial degree + 1. However, the derivative section uses the definition used by de Boor in contrast to the rest of the article, which is confusing. Is it now clear what I meant? Ossi (talk) 15:18, 5 April 2014 (UTC)
 * I'll go ahead and change the formulae. Ossi (talk) 19:39, 10 April 2014 (UTC)

I've reverted the edit. You can't change one k into k-1 and leave others unchanged.

before your edit - $$\frac{dB_{i,k}(x)}{dx}=k\left(\frac{-B_{i+1,k-1}(x)}{t_{i+k}-t_{i+1}}+\frac{B_{i.k-1}(x)}{t_{i+k-1}-t_i}\right)$$

after your edit - :$$\frac{dB_{i,k}(x)}{dx}=(k-1)\left(\frac{-B_{i+1,k-1}(x)}{t_{i+k}-t_{i+1}}+\frac{B_{i.k-1}(x)}{t_{i+k-1}-t_i} \right)$$ Petergans (talk) 11:46, 11 April 2014 (UTC)
 * One can and should change it, because without the change k means a different thing in these expressions and the rest of the article. I don't have the book by de Boor, but in these lecture notes he defines B-spline base case (formula 2.1 on page 2):


 * $$B_{i,1}(x) := \left\{

\begin{matrix} 1 & \mathrm{if} \quad t_j \leq x < t_{i+1} \\ 0 & \mathrm{otherwise} \end{matrix} \right. $$


 * In this Wikipedia article's definition section the base case is defined as:


 * $$B_{i,0}(x) := \left\{

\begin{matrix} 1 & \mathrm{if} \quad t_j \leq x < t_{i+1} \\ 0 & \mathrm{otherwise} \end{matrix} \right. $$


 * As you can see, these are slightly discrepant. The problem is that the derivative expression are correct for B-splines as defined by de Boor but incorrect for B-splines as defined in this article. Ossi (talk) 11:27, 12 April 2014 (UTC)
 * Actually it was the definition section that was wrong. I have de Boor's book and have made the necessary corrections, copying directly from the book. Thank you for bringing the errors to my attention. Petergans (talk) 12:55, 14 April 2014 (UTC)
 * I think the definition was an alternative convention (possibly used by some other author), rather than being just wrong. But it doesn't matter. After your changes the article is now consistent and the issue with the derivative expressions is resolved. Ossi (talk) 15:28, 15 April 2014 (UTC)


 * My two cents: I found the current version (with $$B_{j,1}(x)$$ being piecewise constant) confusing since it talks about "degree k" yet piecewise constant is degree 0 not degree 1. The current version is also different from Non-uniform_rational_B-spline which is similar, of course, and also says the second subscript (n) "corresponds with the degree of the basis function". Regardless of de Boor's nomenclature, 0 seems clearer. —Ben FrantzDale (talk) 13:26, 29 April 2014 (UTC)
 * It seems that in de Boor's nomenclature Bj,k is a spline of order k, not degree. Using de Boor's definition the polynomial degree of the spline is k-1. Ossi (talk) 15:01, 29 April 2014 (UTC)


 * Looking at order of a polynomial and degree of a polynomial, I'm not sure I follow. It appears true that the order of a polynomial can be larger than the largest exponent if you have defined a basis that goes higher, but in this case, isn't the piecewise constant function still order 0? Either way, I'd argue that "degree" gives a clearer explanation with fewer chances for confusion: $$B_{i,0}$$ are the functions that have $$x^0$$ terms, $$B_{i,1}$$ have $$x^1$$ terms, etc. —Ben FrantzDale (talk) 15:43, 29 April 2014 (UTC)
 * It seems de Boor uses a slightly different definition for order (offset of 1) compared to the Wikipedia article. You can see this in his textbook . Look at page 1 in the free preview. Ossi (talk) 21:35, 29 April 2014 (UTC)

Should the summation start from $$i=r-k+1$$ instead of $$i=r-k+2$$, since $$B_{r-k+1,k-1}$$ is nonzero on interval $$[t_{r-k+1},t_{r+1}]$$? --RandomOpossum (talk) 18:14, 18 August 2021 (UTC)

Total number of knots
The total number of knots is not k+2. At both ends there are are k knots because the function and all its derivatives are discontinuous at the limits of definition. Stricly speaking, therefore, the total is 3k, but this would need explanation, so giving the number of internal knots as k is simpler, and is also correct. The multiplicity of the knots at the ends is a technicality of no practical importance. Petergans (talk) 08:47, 18 April 2014 (UTC)
 * The minimum number of knots is k+1. You get this when you have only one spline, which is non zero in k intervals and thus needs k+1 knots. Ossi (talk) 21:20, 18 April 2014 (UTC)
 * Not so. Look at the diagrams. The number of internal knots is equal to the order of the polynomial. Petergans (talk) 08:31, 19 April 2014 (UTC)
 * Yes, that's true. But the degree of the polynomial is k-1 so you get k+1 knots, if you add the knots at the both ends. Ossi (talk) 09:46, 19 April 2014 (UTC)
 * In fact, let me add a reference, so that you'll believe me. Look at the page 4 in de Boor's lecture notes . It says: "In fact, all Bj,k are of exact degree k-1." Ossi (talk) 10:10, 19 April 2014 (UTC)
 * Let's not get confused. I have a personal copy of de Boor's book and have strictly followed the conventions in it. The degree of the polynomial is k. This is clearly stated in the Definitions section and this convention is followed throughout this article. Petergans (talk) 22:57, 19 April 2014 (UTC)
 * If you look at de Boor's definition, it's clear that a linear B-spline has k=2 and a cubic B-spline has k=3 etc. Are you sure you are not confusing the degree of a polynomial and the order of a polynomial as defined by de Boor? I looked at a preview of de Boor's book here . On page 1 he defines that a polynomial of order n is a polynomial of degree < n. Ossi (talk) 23:53, 19 April 2014 (UTC)

The definition
 * $$B_{j,1}(x) := \left\{\begin{matrix} 1 & \mathrm{if} \quad t_j \leq x < t_{j+1} \\0 & \mathrm{otherwise} \end{matrix}\right.$$

is quite clear - when k=1 the spline function has degree 1 and is a constant. Unless you can demonstrate an inconsistency within the article, this discussion is closed. Petergans (talk) 08:49, 20 April 2014 (UTC)
 * I can demonstrate an inconsistency within the article. Take the spline with k=1 you just defined above. It is a piecewise constant function and, as you can see, is non zero in exactly 1 interval. It has 0 internal knots and 2 knots in total when you add the knots at the ends. Since k=1 and thus k+1=2, it is the formula k+1 which gives the correct number of knots (not k+2).


 * Similarly Bj,2 has k=2 and is a piecewise linear function. It has 1 internal knot and 3 knots in total. Correct number of knots is given by k+1=3.


 * Bj,3 has k=3 and is a piecewise quadratic polynomial. It has 2 internal knots and 4 knots in total (as you can see from the first figure in the article). Correct number of knots is given by k+1=4.


 * Etc. for higher degree splines. Is this enough to convince you? (If necessary, I can type out the actual expressions for the splines.) Ossi (talk) 11:55, 20 April 2014 (UTC)
 * Edited my comment to correct a minor error. Ossi (talk) 22:56, 20 April 2014 (UTC)
 * Petergans, are you still following this discussion? There's no hurry, but I want to make sure that I don't have to wait indefinately, if you no longer follow this issue. Ossi (talk) 09:51, 25 April 2014 (UTC)
 * You don't have a case. Are you making a distinction between order and degree? Petergans (talk) 09:09, 26 April 2014 (UTC)
 * I do have a case. Consider the base case B-spline:
 * $$B_{j,1}(x) := \left\{\begin{matrix} 1 & \mathrm{if} \quad t_j \leq x < t_{j+1} \\0 & \mathrm{otherwise} \end{matrix}\right.$$
 * For this spline k=1. The non zero part touches exactly 2 knots, namely tj and tj+1. Thus the number of knots needed is k+1=2 (not k+2, as the article currently states). Do you disagree? If you are not convinced, could specify in which part you think there is an error, so I can either respond or be convinced by your argument. (I didn't use the words degree or order in this comment nor my previous one, so my argument doesn't depend on, how those terms are defined.) Ossi (talk) 15:05, 26 April 2014 (UTC)
 * I looked into de Boor's textbook. It says on page 101: "a spline function of order k may have as few as k+1 knots (but not fewer)". Is this enough to convince you? Ossi (talk) 18:56, 26 April 2014 (UTC)

I've now changed the article to be in accordance with de Boor. Ossi (talk) 14:31, 1 May 2014 (UTC)

Avoiding division by zero
I see this topic mentioned a bit here, but it needs to be addressed: If knots are repeated, which is a common case, the ramp functions,
 * $$\frac{x - t_i}{t_{i+k-1} - t_i}$$

and
 * $$\frac{t_{i+k} - x}{t_{i+k} - t_{i+1}}$$

may go to infinity, which isn't well-behaved. I'm trying to figure out what the right behavior is: It seems like if the ramp function is infinite then the corresponding B may be zero, so we could wave our hands and make that "correction", but that's not exactly elegant. Conceptually those ramp functions are just trying to indicate how far along each knot span x is, so it's probably safe to clamp the ramp functions to the range [0, 1]. Of course, for a knot that appears thee times, that might get weird since the two ramp functions together wouldn't be a partition of unity. What's the Right Way to deal with this? —Ben FrantzDale (talk) 13:18, 29 April 2014 (UTC)
 * The ramp functions don't exactly go to infinity because for repeated knots the numerator also goes to zero, although the expression is of course still undefined. B's whose support is entirely between repeated knots are identically zero. I don't see any problem with knots repeated thrice or more. Ossi (talk) 14:31, 29 April 2014 (UTC)
 * Sure, by l'Hôpital's rule the limit is well-defined as adjacent knots come together. However, coming at this as someone thinking "I think this makes sense, I'll hack it in Python and see if I get pretty curves", it's not obvious what the correct implementation is, since writing what's written mean the fractions can go to infinity which then gets multiplied by either zero or one which gives either nan or infinity. It sounds like I should be able to replace those fractions with a check for the denominator being zero in which case return 1.0 (which will get canceled out by the B. (Although I'm not 100% sure of that: If I replace
 * $$\frac{x-a}{b-a}$$ and $$\frac{b-x}{b-a}$$
 * with
 * $$\lim_{\alpha\to a^-}\frac{x-\alpha}{b-\alpha}$$ and $$\lim_{\alpha\to a^-}\frac{b-x}{b-\alpha}$$
 * respectively, then when $$x=a=b$$ the first would go to 1.0 while the second would go to 0.0...
 * I may have to play with it, but either way, the explanation should touch on the Right Way to deal with this singularity. Cheers. —Ben FrantzDale (talk) 13:52, 30 April 2014 (UTC)
 * It looks like those have to be symmetric: that is, if you replace the first with a function that returns 1 if the ends are equal, then the second should return 0 if the ends are equal. That is, you can replace the first with:
 * $$f(x,t_i,t_j):=\frac{x-t_i}{t_j-t_i}$$ if $$t_i = t_j$$ else 1.0
 * then replace the second with 1-f(x,t_i,t_j), that seems to work. —Ben FrantzDale (talk) 15:38, 30 April 2014 (UTC)
 * I think when the knots coincide, any finite value should produce a correct result, since then the B you are multiplying is identically zero. Ossi (talk) 14:17, 1 May 2014 (UTC)
 * Cool. The other issue I ran into in a naive implementation was that (at least with repeated knots at the end of the spline) was that the basis functions all went to zero. That is, if the last knot, k, has value $$t_k=1.0$$, then $$B_{k-1,1}(1.0)$$ equals zero since $$x=1.0\not<t_{(k-1)+1}=t_k=1.0$$. Experimentally, it looks like the solution is to close all spans that end at the end (or just to close the last finite span). That is, if $$t_{j+1} = \max_i(t_i)$$ then return 1 if $$t_j\leq x\leq t_{j+1}$$ (note the second "$$\leq$$" rather than just "&lt;".—Ben FrantzDale (talk) 17:01, 1 May 2014 (UTC)
 * From The NURBS Book by Piegl and Tiller, when they get 0/0 they evaluate it to zero. They also have a concise algorithm for computing the Ns. —Ben FrantzDale (talk) 13:43, 6 May 2014 (UTC)
 * Is the algorithm same as de Boor's algorithm? Ossi (talk) 23:34, 6 May 2014 (UTC)
 * I think so. —Ben FrantzDale (talk) 13:06, 16 May 2014 (UTC)


 * Below are the two key functions from The NURBS Book by Piegl and Tiller, translated into Python. They seem to be well-behaved at double knots and the like. —Ben FrantzDale (talk) 14:26, 16 September 2014 (UTC)

Dubious: number of parametric directions
The article says "Whereas Bézier curves evolve into only one parametric direction, usually called s or u, NURBS surfaces evolve into two parametric directions, called s and t or u and v." This sounds like it's making the distinction between curves and surfaces. But this isn't fundamental to NURBS versus B-splines. Am I misunderstanding? You can certainly take the tensor product of B-splines or Bézier curves to get surfaces. —Ben FrantzDale (talk) 17:28, 7 May 2014 (UTC)
 * I think you are right. Ossi (talk) 00:50, 10 May 2014 (UTC)

Lead and "introduction"
The WP:LEAD of this article is basically incomprehensible unless you read the "introduction" first, even though it's basically the same material and the definitions aren't that complicated. I suggest replacing most of the current lead with the material from the section called "introduction" and abolishing the latter. JMP EAX (talk) 11:58, 15 August 2014 (UTC)

Duplication & confusion elsewhere, lack of info here
The much more confused article Bézier spline duplicates some of this, although this (B-spline) article isn't exactly peachy either for it fails to explain how B-splines relate to piecewise/composite Bézier curves. JMP EAX (talk) 15:06, 15 August 2014 (UTC)
 * Agreed. There needs to be a combined effort on Bézier spline, Composite Bézier curve, Bézier surface, B-spline, and NURBS. —Ben FrantzDale (talk) 14:39, 16 September 2014 (UTC)

Assessment comment
Substituted at 08:45, 29 April 2016 (UTC)

Lack of notation explanation in Cardinal Spline section
The Cardinal Spline section uses the function

$$B_{i,n,t}(x) = \frac{x-t_i}{h} n[0,\dots,n](. - t_i)^{n-1}_+$$

but that subscript plus symbol is certainly not conventional notation, and needs explaining, or better: this function needs rewriting to a more conventional notation so that the majority of readers can understand it without needing to leave wikipedia to find out what the actual meaning of the notation is. Pomax (talk) 17:41, 23 July 2016 (UTC) — Preceding unsigned comment added by 76.10.187.132 (talk)

Uniqueness of B-splines does not follow from definition
Currently, the Definition section's first paragraph gives a definition of a B-spline. The second paragraph goes on to claim that For any given set of knots, the B-spline is unique, hence the name, B being short for Basis. However, a (non-zero) multiple of a B-spline is again a B-spline for the same knots with the current definition, so uniqueness does not hold. -- 66.253.183.240 (talk) 17:54, 9 October 2016 (UTC)

External links modified
Hello fellow Wikipedians,

I have just modified 1 one external link on B-spline. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
 * Added archive https://web.archive.org/web/20070531044251/http://math.fullerton.edu:80/mathews/n2003/B-SplinesMod.html to http://math.fullerton.edu/mathews/n2003/B-SplinesMod.html

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at ).

Cheers.— InternetArchiveBot  (Report bug) 05:06, 23 October 2016 (UTC)

Example of pieces of the uniform B-spline of order 3 - possible minor error in notation?
Should the following excerpt:

Application of the recursion formula with the knots at $$(0, 1, 2, 3)$$ gives the pieces of the uniform B-spline of order 3
 * $$B_1=x^2/2 \qquad 0 \le x < 1$$
 * $$B_2=(-2x^2+6x-3)/2 \qquad 1 \le x < 2$$
 * $$B_3=(3-x)^2/2 \qquad 2 \le x < 3$$

be labeled $$B_1, B_2, B_3$$?

The notation presented previously suggests B-splines of order 3 (degree 2?) should be notated $$B_{1,2}, B_{2,2}, B_{3,2}$$

Specifically, the solution presented here seems to me to be the piecewise function for :$$B_{1,2}$$

Introduction
I don't mean to be obnoxious here. Every write-up I've ever seen on splines immediately launches into mathematical details. It would be really helpful if this write-up started by painting a 60,000 foot view of splines to orient the reader. What are the basic ideas here? What are we trying to do and why? What's the "Spines for Dummies" story. Five years ago, I struggled through the early parts Dierckx's book. I have since forgotten. Am I now willing to spend many, many hours reading through minutiae ??? Most people need splines as part of a larger task and do not have the time and energy to read all of the gory details. — Preceding unsigned comment added by 2601:648:8400:554:BEE9:2FFF:FE99:5FBC (talk) 15:57, 7 December 2022 (UTC)

Cardinal spline graphics
It would be great to see the control points on these graphs, like on the first graph. 2A02:8071:B783:4980:B8F4:7DD9:7183:8BF0 (talk) 18:45, 5 June 2023 (UTC)