Generating a B-Spline Curve by the Cox-De Boor Algorithm

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.

This Demonstration shows how to generate a B-spline curve by the Cox–De Boor algorithm. The implementation is fully described in the Details.

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


Snapshots


Details

As described in [1], a degree B-spline curve is defined by

, ,

where are the control points and the are the degree B-spline basis functions (see [Related Links]) defined on the nondecreasing knot vector , where and .

For this Demonstration, the initial control points are (but you can drag them, except for the last two), the degree is , and the knot vector is .

The functions, depending only on the knots , given by the knot vector , are defined recursively by

Let ; there is an index such that . From the recursive definition of , the only nonzero functions are . Then

;

Distributing over the sum,

.

However, the support of is , and for , when , and when

So

.

Changing the second index of summation yields

.

Define

,

,

to obtain

.

Finally, iterating the calculations, it follows that

where

.

References

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

[2] 施法中. 计算机辅助几何设计与非均匀有理B样条 CAGD&NURBS[M].北京:高等教育出版社. 1994 pp. 239–242.

[3] Michael E2. "Answer to 'Drawing the Schematic Diagram of Algorithm'." Mathematica Stack Exchange. (Feb 10, 2015) mathematica.stackexchange.com/questions/63471/drawing-the-schematic-diagram-of-algorithm/63536#63536.



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.
Send