Calculating and Plotting B-Spline Basis Functions

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

Let be a nondecreasing sequence of real numbers, that is, , . The are called knots and is the knot vector. The B-spline basis function of degree (or order ), denoted by , is defined as


and for , as


This Demonstration assumes the knots are in order to calculate and plot the .


Contributed by: Shutao Tang (November 2014)
(Northwestern Polytechnical University, Xi'an City, China)
Open content licensed under CC BY-NC-SA



For drawing the schematic diagram of the algorithm, see [2].


[1] L. Piegl and W. Tiller, The NURBS Book, 2nd ed., Berlin: Springer-Verlag, 1997 pp. 50–51.

[2] ShutaoTang. "Drawing the Schematic Diagram of Algorithm." Mathematica Stack Exchange. (Oct 18, 2014)

[3] Michael E2. Answer to "How to Deal with the Condition in B-Spline Basis Function?" Mathematica Stack Exchange. (Oct 15, 2014)

[4] Mr.Wizard. Answer to "A Problem about Sorting Final Result." Mathematica Stack Exchange. (Oct 18, 2014)

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.