how many control points are needed if n+1 data points are interpolated by p degree(or p+1 order) B-Spline?

784 Views Asked by At

Exactly, I suppose that both the number of control points and knot points are decided by the number of data points to be interpolated and the degree of B-Spline basis. However, I found two different answers to the question.

B-spline Curves: Definition

Curve Global Interpolation

it says the

Given a set of n+1 data points, $D_0$, $D_2$, ..., $D_n$ and a degree $p$, find a B-spline curve of degree $p$ defined by $n+1$ control points that passes all data points in the given order.

In summary, it means the number of control points is the number of the data points

Trajectory Planning for Automatic Machines and Robots

this book page 198

enter image description here

it means that the number of control points is the number of data points $n+1$ plus the degree $p$ then minus $1$.

thus, these two answers are conflicted, after all the first is not related to the degree and the second is related to the degree. Anyone could explain this, please I need help.

2

There are 2 best solutions below

0
On BEST ANSWER

For the first description where "the number of control points is the number of the data points", this is the basic B-spline interpolation problem. The resulting B-spline will have $(n+1)$ control points and will have $(n+1-p)$ Bezier segments. This means that the knot points (i.e., the points on the curve corresponding to the knots) will in general not be coincident with the data points.

For the second description, the construction of the knot vector (i.e., eq 4.42) means that it is forcing the knot points to be coincident with the data points. This means that the resulting B-spline curve needs to have $n$ Bezier segments and therefore the B-spline curve will have $(n+1)+p-1$ control points. Since we only have $(n+1)$ data points, we still need $(p-1)$ additional constraints in order to find the unique solution. When $p=3$ (i.e., cubic B-spline), we need 2 additional constraints and a very common choice is to force the 2nd derivative to be 0.0 at $t=0$ and $t=1$, which will produce a result commonly known as "natural cubic spline".

In summary, both descriptions are correct and both are B-spline interpolation. But the resulting B-spline from the 2nd description will have knot points coincident with the data points while the result from the 1st description will not.

2
On

To interpolate $n$ data points, you need a b-spline with $n$ control points, no matter what the degree. In some ways, this is intuitively obvious: the number of degrees of freedom in the spline must be the same as the number of data points.

Or, looking at it another way, you need to solve a system of linear equations to construct the spline. The unknowns are the b-spline control points, and you get one linear equation for each data point interpolation constraint. And, of course, the number of equations has to be the same as the number of unknowns.

The second discussion you quoted makes things more complicated by introducing knot vectors. If you want to construct a b-spline with of degree $p$ with $n$ control points, you need a knot vector with $n+p+1$ elements.

The quantity $(n+1)+p-1$ looks like it depends on $p$, but it really doesn’t. The second discussion is poorly written, in my opinion.