Next Article in Journal
A Decade for the Mathematics: Bibliometric Analysis of Mathematical Modeling in Economics, Ecology, and Environment
Next Article in Special Issue
On Control Polygons of Planar Sextic Pythagorean Hodograph Curves
Previous Article in Journal
Can FinTech Applied to Payments Improve Consumer Financial Satisfaction? Evidence from the USA
Previous Article in Special Issue
G2 Hermite Interpolation by Segmented Spirals
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Generalized de Boor–Cox Formulas and Pyramids for Multi-Degree Spline Basis Functions

School of Science, Jiangnan University, Wuxi 214122, China
*
Author to whom correspondence should be addressed.
Mathematics 2023, 11(2), 367; https://doi.org/10.3390/math11020367
Submission received: 22 November 2022 / Revised: 27 December 2022 / Accepted: 5 January 2023 / Published: 10 January 2023
(This article belongs to the Special Issue Computer-Aided Geometric Design)

Abstract

:
The conventional B-splines possess the de Boor–Cox formula, which relates to a pyramid algorithm. However, for multi-degree splines, a de Boor–Cox-type evaluation algorithm only exists in some special cases. This paper considers any multi-degree spline with arbitrary degree and continuity, and provides two generalized de Boor–Cox-type relations. One uses several lower degree polynomials to build a combination to evaluate basis functions, whose form is similar to using the de Boor–Cox formula several times. The other is a linear combination of two functions out of the recursive definition, which keeps the combination coefficient polynomials of degree 1, so it is more similar to the de Boor–Cox formula and can be illustrated by several pyramids with different heights. In the process of calculating the recursions, a recursive representation using the Bernstein basis is used and numerically analyzed.

1. Introduction

B-splines are well-established tools in computer-aided geometric design. Their basic functions build the unique normalized B-basis in their spanned space of piecewise polynomials, which has optimal shape-preserving properties [1]. Multi-degree splines (MD-splines for short), also called changeable-degree splines, allow different degrees for different segments. In their spanned space of piecewise polynomials with varying degrees, their basic functions also construct the unique normalized B-basis [2]. Therefore, they can be viewed as a direct extension of B-splines.
For MD-splines, the use of splines with varying degrees were investigated by [3] as a tool for approximation. Some variable-degree polynomial functions in [4,5] were constructed for shape-preserving interpolation and more theories were proposed in [6,7,8], in [9] the concept of multi-degree splines was proposed and some MD-spline curves of degree 1, 2 and 3 were built. In [10], a two-degree-spline basis is provided for dividing the process of degree elevation of B-spline into corner-cutting form. In [2,11], two types of MD-splines with different continuities were defined, and [12] deals with an explicit expression for MD-splines. The MD-spline degree-elevation property is provided in [13]. The definition of MD-splines is improved in [14]; two extended partitions are made ingeniously to unify the two types of MD-splines. Such extended partitions for B-splines were proposed in [15]. The support of each basis function is easily determined by the indexes of two extended partitions, and, using this configuration, arbitrary continuity MD-splines can be created. Recent references offer several numerical algorithms due to the inefficiency of the integral definition for MD-splines in numerical calculation. They employ simpler bases to express MD-splines and to compute the representation matrix. In [16], the continuity constraints between spline pieces were collected in a matrix and then its null space was computed by recurrence. In [17], it was proven that the output of this algorithm is exactly the basis of MDB-splines and a Chebyshevian extension of the construction was presented in [18]. The algorithm in [19] repeats the reverse knot insertion (RKI) process to evaluate the transition matrix. An improved version of the algorithm in [19] is outlined in [20]. it is a numerically stable method, because it avoids the derivative operations and minimizes the number of floating-point operations.
B-splines F i , n are recursively computed by applying the de Boor–Cox formula in [21,22], which is related to a pyramid algorithm in [23], namely,
F i , n ( t ) = t t i t i + n t i F i , n 1 ( t ) + t i + n + 1 t t i + n + 1 t i + 1 F i + 1 , n 1 ( t )
In the formula, a B-spline of degree n is represented by two B-splines of degree n 1 , where the combination coefficients are both polynomials of degree 1. According to [24,25], the MD-splines build a de Boor–Cox-type formula if the continuity orders between neighboring pieces of different degrees are no more than 1. For general cases, the de Boor–Cox-type formula does not exist [14].
Our work is focused on more generalized de Boor–Cox-type relations for arbitrary-degree MD-splines with any continuity orders and provides two generalized forms. The first form uses the de Boor–Cox formula several times. A B-spline basis function of degree n is represented as a combination of s + 1 B-splines of degree n s with polynomial coefficients σ i , n s ( t ) , σ i + 1 , n s ( t ) , , σ i + s , n s ( t ) of degree s, i.e.
F i , n ( t ) = σ i , n s ( t ) F i , n s ( t ) + σ i + 1 , n s ( t ) F i + 1 , n s ( t ) + + σ i + s , n s ( t ) F i + s , n s ( t )
For MD-splines, each function N i , n , i = D n + 1 , , K at level n can be represented by functions at recursive level n s , where these functions should be C 0 continuous or discontinuous at knots in their support intervals. On each interval, the sum of the degree of a function involved in the recurrence is similar to (2) and that of its coefficient polynomial is equal to the degree of N i , n . We provide an algorithm to calculate these coefficient polynomials. In the meantime, functions at recursive level n 1 can also be represented by these functions at recursive level n s , allowing the first form to be translated into a new form. In this new form, a function N i , n at recursive level n is represented by a combination of N i , n 1 , N i + 1 , n 1 and functions at recursive level n s , where the coefficient polynomials of N i , n 1 , and N i + 1 , n 1 are bothpolynomials of degree 1. In the second form, a function N i , n at recursive level n is represented by two functions with combination coefficient polynomials of degree 1. The left coefficient polynomial is the result of subtracting the left endpoint of N i , n from t, and the right coefficient polynomial is the result of subtracting t from the right endpoint of N i , n . Two representation functions are not in the integral recursion, but they can be constructed using knots derivative information of functions at recursive level n 1 , n 2 , . . . , 1 . We present a building method based on the Taylor expansion of polynomials which demonstrates the theoretical viability of this form. If we replace functions that are not applicable to de Boor–Cox-type formulas with their construction polynomials in the recursion of MD-spline basis, then any function can be evaluated using this form formula. Multiple pyramids of varying heights can be used to depict this recurrence. To obtain the two forms for MD-splines, we offer a recursive method to evaluate the representation matrix between the MD-spline basis and Bernstein basis, and design some numerical experiments for it. This method utilizes the integral property of Bernstein polynomials and possesses sufficient numerical accuracy and efficiency.
The remainder of this paper is organized as follows: Section 2 reviews the necessary definitions of MD-splines. Section 3 provides a recursive method by Bernstein representation and contains some numerical experiments. Section 4 reveals general recursive relations of the MD-spline basis and constructs de Boor–Cox-type formula. Finally, this paper is concluded with some conclusion.

2. MD-Spline Basis Review

In the following, we will recall some concepts of MD-splines given in [9,14]. MD-spline basis functions are piecewise polynomials defined on a partition of an interval, which is determined by a breakpoint sequence T , a degree sequence G , and a sequence K containing the orders of regularity.
Let T : = t i i = 0 q + 1 , a = t 0 < t 1 < < t q < t q + 1 = b be a strictly increasing partition of a given interval I : = [ a , b ] . If d i > 0 , i = 0 , , q is the degree of the MD-spline on [ t i , t i + 1 ) , then let G : = d i i = 0 q be the degree sequence and D = max d i , 0 i q . Finally, the entries of the order sequence K : = k i i = 1 q , which describe the required continuity at breakpoints t i , i = 1 , 2 , , q , are defined as follows:
k i d i 1 , i f d i 1 = d i , min d i , d i 1 , i f d i 1 d i .
There are two extended partitions of T to determine the support intervals. The left extended partition is
S : = s 1 , s 2 , , s K : = { t 0 , , t 0 d 0 + 1 t i m e s , t 1 , , t 1 d 1 k 1 t i m e s , , t q , . . . , t q d q k q t i m e s } ,
and the right one is
X : = x 1 , x 2 , , x K : = { t 1 , , t 1 d 0 k 1 t i m e s , , t q , , t q d q 1 k q t i m e s , t q + 1 , , t q + 1 d q + 1 t i m e s } ,
where K : = d 0 + i = 1 q ( d i k i ) + 1 = d q + i = 1 q ( d i 1 k i ) + 1 .
Figure 1 shows an example for illustrating the left and right extended partitions. Here, T : = t i i = 0 5 , G : = 3 , 3 , 4 , 5 , 5 , K : = 2 , 2 , 3 , 4 , and K = 10 .
The relation of indexes is noted by function p. In detail, p ( s i ) is the index of the corresponding breakpoint of s i in T and p ( x i ) is the index of the corresponding breakpoint x i in T . That is, t p ( s i ) = s i , and t p ( x i ) = x i . For example, in Figure 1, since s 6 = s 7 = t 2 , p ( s 6 ) = p ( s 7 ) = 2 . Since x 3 = t 3 , p ( x 3 ) = 3 .
Definition 1
(Multi-degree spline basis). For n = 0 , 1 , . . . , D , functions in N i , n ( t ) i = D n + 1 K are generated recursively over T , G and K . The final sequence N i , D ( t ) i = 1 K is a MD-spline basis, given by
N i , n ( t ) = 0 , d j < D n , 1 t [ t j , t j + 1 ) 0 o t h e r w i s e , d j = D n , t ( δ i , n 1 N i , n 1 ( y ) δ i + 1 , n 1 N i + 1 , n 1 ( y ) ) d y , d j > D n .
for each nontrivial interval [ t j , t j + 1 ) [ s i , x i D + n ) = [ t p ( s i ) , t p ( x i D + n ) ) , where
δ i , n : = + N i , n ( y ) d y 1
In addition, when N i , n = 0 , we set
t δ i , n N i , n ( y ) d y = 0 t < s i , 1 t s i .
MD-spline basis N i , D ( t ) i = 1 K possesses some properties such as a B-spline basis:
  • Local support: N i , D ( t ) = 0 for t [ s i , x i ] .
  • Positivity: N i , D ( t ) > 0 for t ( s i , x i ) .
  • End point: N i , D ( t ) vanishes exactly d p ( s i ) m a x j 0 | s i = s i + j times at s i , and d p ( x i ) 1 m a x j 0 | x i j = x i at x i .
  • Partition of unity: i K N i , D ( t ) 1 for all t [ a , b ] .
Some properties of functions N i , n , i = D n + 1 , D n + 2 , , K for any 0 n D are as follows:
  • Support interval: the support interval of N i , n ( t ) is [ s i , x i D + n ) .
  • Degree: on interval [ t j , t j + 1 ) [ s i , x i D + n ) with s i < x i D + n , the degree of N i , n ( t ) equals to d j + n D when n D d j .
  • Continuity: at knot t j , t j ( s i , x i D + n ) with s i < x i D + n , N i , n ( t ) is C k j + n D -continuous when n D k j .
In [24], C k MD-splines are defined to describe some particular MD-spline bases, such as C 0 , C 1 MD-splines.
Definition 2
( C k multi-degree spline basis). An MD-spline basis is said to be a C k MD-spline basis if its functions are, at most, C k continuous at the joins between pieces of different degrees.
In the example of Figure 1, as d 0 = d 1 , d 3 = d 4 , we do not need to consider the continuity at t 1 and t 4 . Therefore, functions in this basis will be C 2 -continuous at the join between [ t 0 , t 2 ) and [ t 2 , t 3 ) , and be C 3 -continuous at the join between [ t 2 , t 3 ) and [ t 3 , t 5 ) . Therefore, the corresponding MD-spline basis will be a C 3 MD-spline basis.

3. Recursive Method

As Bernstein polynomials of degree n form a basis of the space P n of polynomials of degree at most n, functions in { N i , n ( t ) } i = D n + 1 K can be represented by Bernstein polynomials with different degrees. Thus, the recursive process for defining an MD-spline basis can be performed from these Bernstein polynomials.

3.1. Bernstein Representation

Bernstein polynomials [26] of degree n on interval [ t j , t j + 1 ] are defined as
b i , n j ( t ) : = n i t t j i t j + 1 t n i t j + 1 t j n , i = 0 , 1 , , n .
Let
B n j ( t ) : = b 0 , n j ( t ) , b 1 . n j ( t ) , , b n , n j ( t ) T .
Then, each function N i , n , i = D n + 1 , D n + 2 , , K and n = 0 , 1 , , D can be linearly represented as
N i , n ( t ) = a i , n 0 , j b 0 , n j ( t ) + a i , n 1 , j b 1 , n j ( t ) + + a i , n n , j b n , n j ( t ) ,
where a i , n 0 , j , a i , n 1 , j , , a i , n n , j are some constants that are not all zero, and this equation can also be written as
N i , n ( t ) = A i , n j B d j + n D j ( t ) , t [ t j , t j + 1 ) , j = p ( s i ) , p ( s i ) + 1 , , p ( x i + D n ) 1 ,
where A i , n j = a i , n 0 , j , a i , n 1 , j , , a i , n n , j is called the Bernstein representation vector of function N i , n on [ t j , t j + 1 ) .
On the support interval of N i , n , consistent with the previous settings, the number of elements in T is q + 2 . For each n, B n stands for the whole set of Bernstein polynomials:
B n : = B d 1 + n D 1 ( t ) B d 2 + n D 2 ( t ) B d l 1 + n D q + 1 ( t ) .
Let
A i , n : = 0 , , 0 , A i , n p ( s i ) , A i , n p ( s i ) + 1 , , A i , n p ( x i D + n ) 1 , 0 , , 0 .
Then
N i , n ( t ) = A i , n B n ,
and the corresponding representation matrix is
N = M B n ,
where
N : = N D n + 1 , n ( t ) , N D n + 2 , n ( t ) , , N K , n ( t ) T , M : = A D n + 1 , n A K , n ( K D + n ) × j = 1 q + 1 ( d j + n D + 1 )
Compared with the representation matrix in [19], matrix M represents functions in { N i , n } i = D n + 1 K at each recursive level n.
Definition 3
( C k function). A function defined over T , G and K is called a C k function if it is at most C k continuous at breakpoints within its support interval.
C k functions are not equivalent to functions in a C k MD-spline basis, a C k MD-spline basis only requires continuity at the join of different degrees. For example, a C 0 MD-spline basis may contain B-splines; however, B-splines are not C 0 continuous at their internal breakpoints. A C 0 MD-spline basis has some particular properties, such as the integrals of functions in it can be computed easily, which is used in [20]. C 0 functions are also particularly to be used in this section, as their Bernstein presentation vectors are easily expressed.
Example 1.
Consider a C 0 MD-spline basis with T : = 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , G : = 3 , 3 , 3 , 4 , 4 , 4 , 4 and K : = 2 , 2 , 0 , 3 , 3 , 3 . The first function N 1 , 4 and the last function N 13 , 4 are Bernstein polynomials. Function N 6 , 4 is C 0 continuous at t = 3 , and it is plotted in red in Figure 2. Other functions are all B-spline functions, where N i , 4 , i = 2 , 3 , 4 , 5 are C 2 functions and N i , 4 , i = 7 , . . . , 12 are C 3 functions. In addition, all functions N i , 4 , i = 1 , . . . , 13 define a C 0 MD-spline basis. It holds
N 6 , 4 ( t ) = ( 0 , 0 , 0 , 1 ) , ( 1 , 0 , 0 , 0 , 0 ) b 0 , 3 2 ( t ) b 3 , 3 2 ( t ) b 0 , 4 3 ( t ) b 4 , 4 3 ( t ) .
N 6 , 4 is a C 0 function, and its Bernstein representation vector on each interval is composed of an entry equal to 1 and the rest are equal to 0, while the Bernstein representation vectors of B-spline functions include several nonzero entries.

3.2. Recursive Process

The recursion of Bernstein representation vectors is determined by Equation (6) and the integral property of Bernstein polynomial [26]. Each vector A i , n j is affected not only by A r , n 1 j , r = i , i + 1 , but also by A i , n r , r = p ( s i ) , , j 1 and A i , n r , r = j + 1 , , p ( x i D + n ) 1 ; hence, the recursive relationship should be evaluated on distinct intervals.
On interval [ t j , t j + 1 ) [ t p ( s i ) , t p ( x i + D n ) ) , consider the following ( d j + n D + 1 ) × ( d j + n D + 2 ) matrix
H : = 0 1 1 1 0 0 1 1 0 0 0 1 .
The integral of Bernstein polynomials satisfy the equality
t j t b 0 , d j + n D j ( y ) d y t j t b d j + n D , d j + n D j ( y ) d y = t j + 1 t j d j + n D + 1 H B d j + n D + 1 j ( t ) ,
According to the integral formula, the integral of N i , n is determined as follows:
t j t N i , n ( y ) d y = A i , n j t j + 1 t j d j + n D + 1 H B d j + n D + 1 j ( t ) .
Similarly, another part of the integral is
t t j + 1 N i , n ( y ) d y = A i , n j t j + 1 t j d j + n D + 1 1 0 0 0 1 1 0 0 1 1 1 0 B d j + n D + 1 j ( t ) .
The integral recursion can be substituted by the recursive process of Bernstein representation vectors according to Equation (19). The matrix H is just presented in (18) for simplicity of expression. A cumulative-sum operation can be used to describe the recursion of a representation vector in calculation.
Without loss of generality, assuming that A i , n j = ( a 0 , a 1 , , a d j + n D ) on interval [ t j , t j + 1 ) , j = p ( s i ) , , p ( x i + n D ) 1 , it holds that
N i , n ( t ) = ( a 0 , a 1 , , a d j + n D ) B d j + n D j ( t ) .
We indicates the cumulative-sum operation by an operator Γ :
Γ ( A i , n j ) : = t j + 1 t j d j + n D + 1 ( 0 , a 0 , a 0 + a 1 , , a 0 + a 1 + + a d j + n D ) .
Thus,
t j t N i , n ( y ) d y = Γ ( A i , n j ) B d j + n D + 1 j ( t ) .
Then, we use an operator Λ to extract the last element of a vector. For example, Λ ( A i , n j ) = a d j + n D . Then,
t j t j + 1 N i , n ( y ) d y = Λ Γ ( A i , n j ) .
Consider t [ t j , t j + 1 ) , j = p ( s i ) + 1 , . . . , p ( x i + n D ) 1 . The integral starting from t p ( s i )  is
t p ( s i ) t N i , n ( y ) d y = r = p ( s i ) j 1 Λ Γ ( A i , n r ) + Γ ( A i , n j ) B d j + n D + 1 j ( t ) , = r = p ( s i ) j 1 Λ Γ ( A i , n r ) Γ ( A i , n j ) B d j + n D + 1 j ( t ) ,
where r = p ( s i ) j 1 Λ Γ ( A i , n r ) is a constant, and Γ ( A i , n j ) is a vector. The symbol ⊕ means that r = p ( s i ) j 1 Λ Γ ( A i , n r ) is added to each element in Γ ( A i , n j ) .
Using the two operators above, δ i , n can be calculated as follows:
1 δ i , n = + N i , n ( y ) d y = r = p ( s i ) p ( x i D + n ) 1 Λ Γ ( A i , n r ) .
Consistent with the conventional B-splines, functions in an MD-spline basis can be independently calculated using a recursive method. According to the Bernstein representation, once the vector A i , D is calculated, function N i , D is determined. Consequently, Bernstein representation vectors can replace functions in the recursive process.
The support interval of N i , D , i = 1 , , K is [ s i , x i ) ; therefore, there are p ( x i ) p ( s i ) intervals in it. Therefore, we establish an initial ( D + 1 ) × ( p ( x i ) p ( s i ) ) matrix M ; each entry is 0 and indicates a vector A k , 0 j = 0 , k = i , , i + D , j = p ( s i ) , , p ( x i ) 1 .
Matrix M has D + 1 rows, which means that there are D + 1 corresponding functions on [ s i , x i ) when n = 0 . However, the indexes of these D + 1 functions may exceed the limit range [ D + 1 , K ] . There are two solutions for this. One does not generate rows whose indexes surpass the maximum allowed range. The other one disregards these rows because all of their elements equal 0. In order to make the algorithm more understandable, we employ the second solution. In the recursive process, we use these vectors A k , n j , n = 0 , . . . , D to explain the recursion of matrix M in the algorithm.
There are some details in this procedure.
  • The operation (line 12) causes vectors A i , n j with the same index j have the same length, hence allowing these vectors can bulid the matrix M .
  • M k (line 15) indicates the k t h row of the matrix M , and ( δ k , n ) 1 = A k , n p ( x k + n D ) 1 . Thus each row is normalized.
  • There are only two cases of subtraction without considering the subtraction of zero rows (line 19 and 21).
  • The subtraction is performed in range (lines 20, 22 and 23).
Algorithm 1 only calculates one function in MD-spline basis. If vectors in the initial matrix are changed to be A k , 0 j , k = 1 , , K + D , j = p ( s 1 ) , , p ( x K ) 1 , all basis functions are produced.
The following is an example for Algorithm 1.
Example 2.
Consider a MD-spline basis with T : = 0 , 1 , 4 , 7 , 10 , G : = 2 , 3 , 4 , 3 , and K : = 1 , 2 , 3 . Two extended partition are S : = 0 , 0 , 0 , 1 , 1 , 4 , 4 and X : = 1 , 4 , 7 , 10 , 10 , 10 , 10 . We are aming to calculate function N 3 , 4 . These partitions are shown in Figure 3.
The support interval of N 3 , 4 is [ s 3 , x 3 ) = [ 0 , 7 ) , and p ( s 3 ) = 0 , p ( x 3 ) = 3 . Thus the order of the initial matrix M is 5 × 3 , then
M = A 3 , 0 0 A 3 , 0 1 A 3 , 0 2 A 4 , 0 0 A 4 , 0 1 A 4 , 0 2 A 5 , 0 0 A 5 , 0 1 A 5 , 0 2 A 6 , 0 0 A 6 , 0 1 A 6 , 0 2 A 7 , 0 0 A 7 , 0 1 A 7 , 0 2 = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .
At the beginning of each loop, value 1 is assigned to the vector that satisfies the condition in line 5 in Algorithm 1. Therefore, A 7 , 0 2 = 1 .
Algorithm 1 Recursive process of Bernstein representation vectors.
Input: T , G , K , i
Output: A i , D
1:
Initial M = A k , 0 j , A k , 0 j = 0 , k = i , . . . , i + D , j = p ( s i ) , . . . , p ( x i ) 1 ;
2:
for n 0 to D 1 do
3:
    for k i to i + D n do
4:
        for j p ( s k ) to p ( x k + n D ) 1 do
5:
           if ( d j = = D n ) then A k , n j 1
6:
           end if
7:
        end for
8:
        for j p ( s k ) to p ( x k + n D ) 1 do
9:
            A k , n j k = p ( s i ) j 1 Λ Γ ( A k , n r ) Γ ( A k , n j )
10:
        end for
11:
        for j ← p ( s i ) to p ( x i ) 1 do
12:
           if ( d j > = 0 ) and ( Λ ( A k , n j = = 0 ) ) then A k , n j Γ ( A k , n j )
13:
           end if
14:
        end for
15:
        if Λ ( A k , n p ( x k + n D ) 1 ) 0 then M k Λ ( A k , n p ( x k + n D ) 1 ) 1 M k
16:
        end if
17:
    end for
18:
    for k i to i + D n 1 do
19:
        if Λ ( A k , n p ( x k + n D ) 1 ) = = 0 and Λ ( A k + 1 , n p ( x k + 1 + n D ) 1 ) 0 then
20:
            M k 1 M k + 1 ( p ( s k ) , p ( x k + 1 + n D ) 1 )
21:
        else if Λ ( A k , n p ( x k + n D ) 1 ) 0 and Λ ( A k + 1 , n p ( x k + 1 + n D ) 1 ) 0 then
22:
            M k M k M k + 1 ( p ( s k ) , p ( x k + n D ) 1 )
23:
            M k 1 M k + 1 ( p ( x k + n D ) , p ( x k + 1 + n D ) 1 )
24:
        end if
25:
    end for
26:
    Delete the last row of M ;
27:
end for
Because there is no C 0 function when n = 0 , 1 . In order to be concise, we start the calculation from n = 2 . In this case, it is easy to get M :
M = A 3 , 2 0 A 3 , 2 1 A 3 , 2 2 A 4 , 2 0 A 4 , 2 1 A 4 , 2 2 A 5 , 2 0 A 5 , 2 1 A 5 , 2 2 = 1 ( 0 , 0 ) ( 0 , 0 , 0 ) 0 ( 1 , 0 ) ( 0 , 0 , 0 ) 0 ( 0 , 1 ) ( 1 , 0 , 0 ) .
In the third row of M, the results of cumulative sum and normalization operations are as follows:
Γ ( A 5 , 2 1 ) = ( 0 , 0 , 3 2 ) ; Λ ( Γ ( A 5 , 2 1 ) ) = 3 2 ,
and
Γ ( A 5 , 2 2 ) = ( 0 , 1 , 1 , 1 ) ; Λ ( Γ ( A 5 , 2 1 ) ) Γ ( A 5 , 2 2 ) = ( 3 2 , 5 2 , 5 2 , 5 2 ) .
Thus δ 5 , 2 = 2 5 . Note that Γ ( A 5 , 2 0 ) = ( 0 , 0 ) . After normalization, this row changes into
M 3 = ( 0 , 0 ) ( 0 , 0 , 3 5 ) ( 3 5 , 1 , 1 , 1 ) .
Similarly, the second row changes into
M 2 = ( 0 , 0 ) ( 0 , 1 , 1 ) ( 0 , 0 , 0 , 0 ) .
According to the substraction in Algorithm 1, M 2 M 2 M 3 equals to ( 0 , 1 , 1 ) ( 0 , 0 , 3 5 ) on interval [ t 1 , t 2 ) and ( 1 , 1 , 1 , 1 ) ( 3 5 , 1 , 1 , 1 ) on interval [ t 2 , t 3 ) . After substraction
M 2 = ( 0 , 0 ) ( 0 , 1 , 2 5 ) ( 2 5 , 0 , 0 , 0 ) .
M 1 M 1 M 2 can be computed in the same manner. Then, remove the third row and M change into the subsequent one:
M = A 3 , 3 0 A 3 , 3 1 A 3 , 3 2 A 4 , 3 0 A 4 , 3 1 A 4 , 3 2 = ( 0 , 1 ) ( 1 , 0 , 0 ) ( 0 , 0 , 0 , 0 ) ( 0 , 0 ) ( 0 , 1 , 2 5 ) ( 2 5 , 0 , 0 , 0 ) .
By repeating these operations, then the final vector will be
M = A 3 , 4 0 A 3 , 4 1 A 3 , 4 2 = ( 0 , 0 , 1 3 ) ( 1 3 , 1 , 7 17 , 3 17 ) ( 3 17 , 0 , 0 , 0 , 0 ) .
Therefore,
N 3 , 4 ( t ) = A 3 , 4 B 4 = A 3 , 4 0 A 3 , 4 1 A 3 , 4 2 0 B 4 = M B 2 0 ( t ) B 3 1 ( t ) B 4 2 ( t ) .
This example can aid comprehension of this section. Although only a portion of the calculation is displayed, the entire recursion is similar. The representation matrix may be calculated directly, and this method is quite intuitive and straightforward to comprehend.

3.3. Algorithm Analysis

The numerical stability of Algorithm 1 is influenced by the floating point operations. There are three types of operations in the algorithm.
1
Cumulative sum operation: the operation in Algorithm 1 (line 9) is composed of addition and multiplication. All elements in the vector are positive and increasing. If the length of an interval is excessively long, the number of bits of elements may vary significantly. This procedure frequently executes this operation, resulting in numerical inaccuracies.
2
Normalized operation: this operation restricts all elements in A i , n to the range [ 0 , 1 ] . Since the denominator is the largest number in this vector and all members are positive, this operation will not result in a significant amount of numerical inaccuracy.
3
Subtraction operation: Equation (19) prevents the scenario where two approximate floating point-numbers are subtracted.
The complexity of Algorithm 1 depends on the settings of the sequences T , G , K , so, like reference [20], we only count the number of operations.
At each recursive level in Algorithm 1, there are no more than K D + n non-zero rows of each M . Therefore, the total number of non-zero rows will not exceed K D in the whole recursive process.
  • Cumulative sum operation: the number of elements in G is q + 1 ; thus, the number of this operation will not exceed K D ( q + 1 ) .
  • Normalized operation: each non-zero row will be normalized, so the maximum number of this operation is K D ( q + 1 ) .
  • Subtraction operation: similarly, there are K D subtraction operations, at most.
Thus, the number of operations will not exceed K D ( 2 q + 3 ) , which is used to estimate the numerical complexity of Algorithm 1.
Due to the recursive nature of Algorithm 1, the cyclical calculation of floating-point numbers may lead to error accumulation. Based on the preceding research, the cumulative sum operation is the primary source of mistake. This error can be reduced by a bidirectional algorithm, and Equation (6) is reformed as follows:
N i , n ( t ) = δ i , n 1 t N i , n 1 ( s ) d s , t [ s i , s i + 1 ) , δ i , n 1 t N i , n 1 ( s ) d s δ i + 1 , n 1 t N i + 1 , n 1 ( s ) d s , t [ s i + 1 , ξ ) , δ i + 1 , n 1 t + N i + 1 , n 1 ( s ) d s δ i , n 1 t + N i , n 1 ( s ) d s , t [ ξ , x i + n D 1 ) , δ i + 1 , n 1 t + N i + 1 , n 1 ( s ) d s , t [ x i + n D 1 , x i + n D ) ,
   where ξ : = s i + 1 + ( x i + n D 1 s i + 1 ) / 2 . The symbol means rounding down operation.
Then, Algorithm 1 is modified, and the subsequent Algorithm 2 is more numerically stable in calculation.
To represent the reverse integral, we define two reverse operators. Consistent with the prior setting A i , n j = ( a 0 , a 1 , , a d j + n D ) , then Γ ¯ ( A i , n j ) = ( a 0 + + a d j + n D , a 1 + + a d j + n D , , a d j + n D , 0 ) and Λ ¯ ( A i , n j ) = a 0 . Algorithm 2 is as follows:
Algorithm 2 Revised recursive method.
1:
Same setting as Algorithm 1;
2:
for n 0 to D 1  do
3:
    for k i to i + D n  do
4:
        for j p ( s k ) to p ( x k + n D ) 1  do
5:
           if  ( d j = = D n ) then A k , n j 1
6:
           end if
7:
        end for
8:
    end for
9:
     M L M , M R M ;
10:
    for j p ( s k ) to p ( x k + n D ) 1  do
11:
         M k , j L r = p ( s i ) j 1 Λ Γ ( A k , n r ) + Γ ( A k , n j ) ;
12:
         M k , j R r = j + 1 p ( x k D + n ) 1 Λ ¯ Γ ¯ ( A k , n r ) + Γ ¯ ( A k , n j ) ;
13:
    end for
14:
    Extend zero vectors;
15:
    if  Λ ( M k , p ( x k + n D ) 1 L ) 0 then M k L Λ ( M k , p ( x k + n D ) 1 L ) 1 M k L
16:
    end if
17:
    if  Λ ¯ ( M k , p ( s k ) R ) 0 then M k R Λ ¯ ( M k , p ( s k ) R ) 1 M k R
18:
    end if
19:
    for k i to i + D n 1  do
20:
        for j p ( s k ) to p ( s k + 1 )  do
21:
            M k , j M k , j L ;
22:
        end for
23:
        for j p ( s k + 1 ) to p ( s k + 1 ) + ( p ( x k + n D ) 1 p ( s k + 1 ) ) / 2  do
24:
            M k , j M k , j L M k + 1 , j L ;
25:
        end for
26:
        for j← p ( s k + 1 ) + ( p ( x k + n D ) 1 p ( s k + 1 ) ) / 2 + 1 to p ( x k + n D ) 1  do
27:
            M k , j M k + 1 , j R M k , j R ;
28:
        end for
29:
        for j p ( x k + n D ) 1 to p ( x k + n D + 1 ) 1  do
30:
            M k , j = M k + 1 , j R
31:
        end for
32:
    end for
33:
    Delete the last row of M ;
34:
end for

3.4. Numerical Experiment

In [20], three typical methods for calculating an MD-spline basis are compared, which are named RKI/Greville, RKI/Derivative and H-Operator. Due to the higher order derivative operations, RKI/Derivative and H-Operator are not numerically stable, while RKI/ Greville avoids these operations and it is numerically stable.
Then, we will design some experiments in Table 1 to test Algorithms 1 and 2. Calculation results are divided into ’Exact’ and ’Numerical’. The ’Exact’ results rely on the symbolic computation in MATLAB, while the ’Numerical’ results are determined by the standard precision in MATLAB (rounding unit e 10 16 ).
Example 3.
Values in Table 2 are calculated from Algorithm 1, where ’Exact’ in the second column indicates that the Bernstein representation matrix M is calculated through symbolic computation. Exact MD-spline basis and Bernstein basis are also calculated by symbolic computation. The absence of relative error in the third column demonstrates that Algorithm 1 is correct.
Example 4.
This experiment demonstrates that Algorithm 1 requires revision. The addition of two floating integers with significantly dissimilar digits will result in significant numerical errors. In Table 3, the value produced by Algorithm 1 on the third row has a large relative error and does not symmetric with the first value, whereas the problem is avoided by Algorithm 2.
Example 5.
Table 4 illustrates the values and relative errors of N 17 , 21 for Test 3. The RKI/Greville method is unquestionably stable. Algorithm 2 has adequate numerical precision in this instance, where the highest degree exceeds 20. This algorithm is typically stable in experiments below this degree.
Example 6.
This experiment shows that the efficiency of different methods, as measured by MATLAB execution time. Results in Table 4 are calculated using the same point values for four tests. All tests are performed on an environment consisting of MATLAB 2020a and the AMD Ryzen 5 4600U.
Calculating the values of basis functions at the internal knots yields the running time. Note that Algorithm 2 can calculate a single function in the MD-spline basis; its experiment is divided into two separate instances. The information displayed in the second column of Table 4 represents the duration of a single basis function. In order to ensure that values of this function are not zero at most knots, we select the middle basis function. A second scenario involves calculating the values of all basis functions at knots.
Based on the data in Table 5, it is evident that the efficacy of Algorithm 2 is assured. When the degree of basis is low, as in Test 1 and Test 2, there is little difference between the computation times of single functions and whole functions. However, as the degree increases, so does the efficiency gap.
In some extreme cases, such as Test 4, the degrees of the basis functions are extremely high, making it inefficient to calculate the values of all functions. As the RKI/Greville method is calculated on separate pieces, it needs longer running time.
Compared to the RKI/Greville method, Algorithm 2 is less accurate numerically but more efficient in its calculations. Using a B-spline basis instead of a Bernstein basis as representation functions can improve the numerical precision due to the smaller representation matrix reducing the number of floating-point operations.
Recursive Bernstein representation is not only meaningful for calculation, but it also provides a tool for investigating the recursive relations of MD-spline.

4. Generalized de Boor–Cox-Type Recursive Relations

In this section, we will discuss two generalized de Boor–Cox-type relations of MD-splines.

4.1. The First Form of Generalized de Boor–Cox-Type Relation

A de Boor–Cox-type formula for C 1 MD-spline bases exists because C 0 functions are formed by two or three Bernstein polynomial segments, and vectors corresponding to C 0 functions on each interval are composed of an entry equal to 1 and the rest equal to several elements at 0. Therefore, C 1 functions can always be represented by two C 0 functions. However, this type of relation does not exist between C k , k > 1 , functions and C k 1 functions.
Theorem 1.
There is no de Boor–Cox-type recursive relation for C k MD-spline basis for k > 1 .
Proof of Theorem 1.
For a C k , k > 1 , function N i , D , assume that the following equation holds:
N i , D ( t ) = f 1 ( t ) N i , D 1 ( t ) + f 2 ( t ) N i + 1 , D 1 ( t )
where f 1 ( t ) and f 2 ( t ) are two polynomials of degree 1. Without loss of generality, on a single interval [ t j , t j + 1 ) , let A i , D 1 j = ( a 11 , a 12 , , a 1 s ) and A i + 1 , D 1 j = ( a 21 , a 22 , , a 2 s ) . Both vectors A i , D 1 j and A i + 1 , D 1 j contain more than one non-zero element. Using A i , D j ( h ) to indicate the h-th element of A i , D j , it should be satisfied that
A i , D j ( h ) = c + t t j t j + 1 t j p = 1 h ( δ i , D 1 a 1 p δ i + 1 , D 1 a 2 p ) + t j + 1 t t j + 1 t j p = 1 h 1 ( δ i , D 1 a 1 p δ i + 1 , D 1 a 2 p ) = C h + t t j t j + 1 t j ( δ i , D 1 a 1 h δ i + 1 , D 1 a 2 h ) = f 1 ( t ) a 1 h + f 2 ( t ) a 2 h ,
where c and C h are two constants. Then, functions f 1 ( t ) and f 2 ( t ) will be
f 1 ( t ) = t t j t j + 1 t j δ i , D 1 + α ; f 2 ( t ) = t t j t j + 1 t j δ i + 1 , D 1 + β ; α a 1 h + β a 2 h = C h ,
where α and β are two unknown real numbers. As h is arbitrary, we have
α a 11 + β a 21 = C 1 ; α a 1 h + β a 2 h = C h ; α a 1 s + β a 2 s = C s .
Since there are more than one non-zero element in A i , D 1 j and A i + 1 , D 1 j , system (41) is overdetermined and has no solution in most cases. Thus, Equation (38) does not hold.    □
Any C k , k > 1 , MD-spline basis function can be represented as several C 0 functions.
Theorem 2.
For C k , k > 1 MD-spline basis, assume that functions { N i , s } i = D s + 1 K are all C 0 functions or Bernstein polynomials. Then, function N i , n , n > s , can be represented as
N i , n ( t ) = f i , s ( t ) N i , s ( t ) + f i + 1 , s ( t ) N i + 1 , s ( t ) + . . . + f i + n s , s ( t ) N i + n s , s ( t ) .
Proof. 
Proof of Theorem 2 Since each piece of C 0 functions equals to Bernstein polynomial, coefficient polynomials f j , s j = i i + n s can be determined by Bernstein representation vectors. Since { B d j + n D j } j = p ( s i ) p ( x i + D n ) 1 can be expressed by { B d j + s D j } j = p ( s i ) p ( x i + D n ) 1 as
B d j + n D j = L s , n j B d j + s D j ,
where
L s , n j = b 0 , n s j ( t ) b 1 , n s j ( t ) b 0 , n s j ( t ) b n s , n s j ( t ) b n s , n s 1 j ( t ) b 0 , n s j ( t ) b n s , n s j ( t ) b n s 1 , n s j ( t ) b n s , n s j ( t ) ,
N i , n can also be expressed by { B d j + s D j } j = p ( s i ) p ( x i + D n ) 1 . Therefore, Equation (42) always holds in the inner interval [ t p ( s i ) + 1 , t p ( x i D + n ) 1 ) , and we only need to focus on the first interval [ t p ( s i ) , t p ( s i ) + 1 ) and the last interval [ t p ( x i D + n ) 1 , t p ( x i D + n ) ) .
On the first one [ t p ( s i ) , t p ( s i ) + 1 ) , assume that A i , s p ( s i ) ( j ) = 1 ; then, elements from the first to ( j + s 1 ) th in A i , n p ( s i ) are 0, and A i , n p ( s i ) ( j + s ) is nonzero according to the integral property of Bernstein polynomials. Thus, elements from the first to the ( j 1 ) th in A i , n p ( s i ) L s , n p ( s i ) are 0, which means that A i , n p ( s i ) L s , n p ( s i ) = j = i i + n s f j , s ( t ) A j , s p ( s i ) .
Similarly, on the last one [ t p ( x i D + n ) 1 , t p ( x i D + n ) ) , this relationship can be determined, then N i , n is expressed as Equation (42).    □
Based on the recursive property of Bernstein polynomials, Theorem 2 reveals a relationship between functions in the recursive process, which is the first form of generalized de Boor–Cox-type relation. The coefficient polynomials { f j , s } j = i i + n s are piecewise, but not unique. Moreover, their domains must fall inside the support intervals of the corresponding functions.
The recursive method of Bernstein representation vectors provides a tool for calculating the coefficient polynomials. Since C 0 functions and Bernstein polynomials have unique Bernstein representation vectors, all { f j , s } ) j = i i + n s in Equation (42) will be computed from A i , n j L s , n j , j = p ( s i ) , . . . , p ( x i + n D ) 1 .
Note that A j , s , j = i , , i + n s has a single non-zero element 1 and has the same length as A i , n (line 6) on each interval. Therefore, coefficient f j , s is the corresponding element in A i , n , which can be obtained by the element-wise division operation in Algorithm 3 (line 6).
Algorithm 3 Coefficient polynomials calculation.
Input: { A j , s } j = i i + n s
Output: { f j , s } j = i i + n s
1:
Compute A i , n by Algorithm 2
2:
for k p ( s i ) to p ( x i + D ) 1  do
3:
     A i , n k A i , n k L s , n k ;
4:
end for
5:
for j i to i + n s  do
6:
     A j , s A j , s . / A i , n ;
7:
    for k p ( s j ) to p ( x i + s D ) 1  do
8:
         f j , s k ( t ) q = 1 d k + s D + 1 A j , s k ( q ) 1 ;
9:
    end for
10:
end for
Typically, functions N i , s , N i + 1 , s , , N i + n s , s are situated at a lower recursive level. Some C 0 functions occur at subsequent recursive levels. For instance, N i , s + 1 is a C 0 function and the representation functions of N i , n can be N i , s + 1 , N i + 1 , s , , N i + n s , s , which are situated at various recursive levels.
Example 7.
Assume that T : = 0 , 1 , 2 , 3 , 5 , 8 , G : = 4 , 5 , 4 , 3 , 5 , K : = 3 , 2 , 3 , 2 . Then, N i , 2 i = 5 8 are all C 0 functions or Bernstein polynomials. Function N 5 , 5 ( t ) can be represented as follows:
N 5 , 5 ( t ) = f 5 , 2 ( t ) N 5 , 2 ( t ) + f 6 , 2 ( t ) N 6 , 2 ( t ) + f 7 , 2 ( t ) N 7 , 2 ( t ) + f 8 , 2 ( t ) N 8 , 2 ( t ) ,
considering the following diagonally chunked matrix:
L = L 2 , 5 0 L 2 , 5 1 L 2 , 5 2 ,
where L 2 , 5 0 , L 2 , 5 1 and L 2 , 5 2 can be obtained by Equation (44). Then, coefficient polynomials are determined by
A 5 , 5 L = ( 0 , f 5 , 2 0 ( t ) ) , ( f 5 , 2 1 ( t ) , f 6 , 2 ( t ) , f 7 , 2 ( t ) ) , ( f 8 , 2 ( t ) , 0 ) .
Next, a distinct set of functions is employed to represent N 5 , 5 . Note that N 7 , 3 is a C 0 function, and functions f 7 , 2 , f 8 , 2 in Equation (45) can be replaced by N 7 , 3 . Over three intervals, the coefficient polynomials must be computed successively. On interval [ 2 , 3 ) , it holds that
A 5 , 5 2 L 3 , 5 2 = f 7 , 3 2 ( t ) , 0 , 0 .
On interval [ 1 , 2 ) , it holds that
A 5 , 5 1 L 3 , 5 1 = g 1 ( t ) , g 2 ( t ) , f 6 , 3 ( t ) , f 7 , 3 1 ( t ) ,
for the same functions g 1 and g 2 . Then,
g 1 ( t ) , g 2 ( t ) , 0 , 0 L 2 , 3 2 = f 5 , 2 1 ( t ) , f 6 , 2 ( t ) , 0 .
On interval [ 0 , 1 ) , it holds that
A 5 , 5 0 L 2 , 5 0 = 0 , f 5 , 2 0 ( t ) .
Thus,
N 5 , 5 ( t ) = f 5 , 2 ( t ) N 5 , 2 ( t ) + f 6 , 2 ( t ) N 6 , 2 ( t ) + f 6 , 3 ( t ) N 6 , 3 ( t ) + f 7 , 3 ( t ) N 7 , 3 ( t ) ,
where functions N 5 , 2 , N 6 , 2 , N 6 , 3 , ad N 7 , 3 are not at the same level, and the coefficient polynomials f 5 , 2 and f 6 , 2 are not equivalent to them in Equation (45).
Here, two distinct representations of this function are shown, and Figure 4 depicts the coefficient polynomials. These relationships are prevalent throughout the recursive procedure.
Based on the above discussion, functions at the recursive levels n and n 1 can all be represented by several C 0 functions or Bernstein polynomials. Consequently, N i , n can be represented as follows:
N i , n ( t ) = f i , n 1 ( t ) N i , n 1 ( t ) + f i + 1 , n 1 ( t ) N i + 1 , n 1 ( t ) + j = i i + n s f j , s ( t ) N j , s ( t ) ,
where functions N j , s j = i i + n s refer to C 0 functions or Bernstein polynomials; f i , n 1 , f i + 1 , n 1 are polynomials of degree 1. This equation is a general relationship for functions in the MD-spline recursive process.
This subsection summarizes several broad relationships that exist in the recursion; nonetheless, there is no law for generating coefficient polynomials. Consequently, the first generalized de Boor–Cox-type formula lacks practical relevance.

4.2. The Second Form of Generalized de Boor–Cox-Type Relation

Since Equation (38) cannot be found in the recursion of MD-spline basis, we must resort to functions outside of the recursion process in order to obtain this type of formula. If we design two suitable functions that can substitute two functions in the linear combination (42), we have a generalized de Boor–Cox-type formula.
For each N i , n , i = D n + 1 , , K , n = 0 , , D , we have the following result.
Theorem 3.
It holds that
N i , n ( t ) = ( t t p ( s i ) ) L i , n ( t ) + ( t p ( x i + n D ) t ) R i , n ( t ) ,
where L i , n and R i , n are both piecewise polynomials.
Proof of Theorem 3.
On interval [ t j , t j + 1 ) [ s i , x i + D n ) , the Taylor expansion of function N i , n is given by all its derivatives. For convenience, let f ( t ) = N i , n ( t ) , t [ t j , t j + 1 ) . Then
f ( t ) = f ( t j ) + r = 1 d j + n D 1 r ! ( t t j ) r f ( r ) ( t j ) = f ( t j + 1 ) + r = 1 d j + n D 1 r ! ( t j + 1 t ) r f ( r ) ( t j + 1 ) = f ( t j ) + r = 1 d j + n D 1 r ! ( t t p ( s i ) t j + t p ( s i ) ) r f ( r ) ( t j ) = f ( t j ) + r = 1 d j + n D 1 r ! k = 0 r r k ( t t p ( s i ) ) k ( t p ( s i ) t j ) r k f ( r ) ( t j ) = r = 0 d j + n D ( t p ( s i ) t j ) r f ( r ) ( t j ) + ( t t p ( s i ) ) r = 1 d j + n D 1 r ! k = 0 r 1 r k ( t t p ( s i ) ) k ( t p ( s i ) t j ) r 1 k f ( r ) ( t j ) = r = 0 d j + n D ( t j + 1 t p ( x i + n D ) ) r f ( r ) ( t j + 1 ) + ( t p ( x i + n D ) t ) r = 1 d j + n D 1 r ! k = 0 r 1 r k ( t p ( x i + n D ) t ) k ( t j + 1 t p ( x i + n D ) ) r 1 k f ( r ) ( t j + 1 ) .
Let
L i , n ( t ) = 1 2 r = 1 d j + n D 1 r ! k = 0 r 1 r k ( t t p ( s i ) ) k ( t p ( s i ) t j ) r 1 k f ( r ) ( t j ) + 1 2 ( t p ( x i + n D ) t p ( s i ) ) r = 0 d j + n D ( t p ( s i ) t j ) r f ( r ) ( t j ) + ( t j + 1 t p ( x i + n D ) ) r f ( r ) ( t j + 1 ) ,
and
R i , n ( t ) = 1 2 r = 1 d j + n D 1 r ! k = 0 r 1 r k ( t p ( x i + n D ) t ) k ( t j + 1 t p ( x i + n D ) ) r 1 k f ( r ) ( t j + 1 ) + 1 2 ( t p ( x i + n D ) t p ( s i ) ) r = 0 d j + n D ( t p ( s i ) t j ) r f ( r ) ( t j ) + ( t j + 1 t p ( x i + n D ) ) r f ( r ) ( t j + 1 ) .
Then, Equation (54) holds. □
Functions L i , n and R i , n , here, are constructed by N i , n ( r ) ( t j ) and N i , n ( r ) ( t j + 1 ) , r = 0 , , d j + n D . Due to the integral definition of the MD-spline basis, the values of derivatives at t j , t j + 1 can be calculated by the functions in previous recursive levels. The derivative equation is as follows:
N i , n ( t ) = δ i , n 1 N i , n 1 ( t ) δ i + 1 , n 1 N i + 1 , n 1 ( t ) .
In addition, the values of N i , n ( t j ) and N i , n ( t j + 1 ) can be calculated by the integral of N i , n 1 and N i + 1 , n 1 .
Consequently, this form of the formula is conceptually similar to the de Boor–Cox formula. Despite the fact that new functions L i , n and R i , n must be generated, they are all constructed using information from previous functions. Only the intricacy of construction needs to be considered. Taylor expansions are only used for theoretical exposition and cannot be implemented in practice. The coefficient polynomials need only be guaranteed to be polynomials of degree 1; they need not be identical to them in Equation (54). It is even feasible to employ piecewise coefficients to lessen the complexity of construction.
The generalized de Boor–Cox-type formula will employ a generalized pyramid structure, which will be contrasted to the pyramid for B-spline in the accompanying illustration.
Example 8.
For B-spline basis F i , n ( t ) i = 1 K , all the basis functions possess similar pyramids; hence, often only one pyramid is depicted. Several pyramids may be utilized to describe the de Boor–Cox recursion for B-splines if the entire basis is used, as shown in Figure 5. The knot sequence is T : = 0 , 1 , 2 , 3 , 4 and the degree is 4. All pyramids have the same height beginning with the degree 0 functions, i.e., the functions at level 0 in the de Boor–Cox-type recursion.
For a MD-spline basis with T : = 0 , 1 , 2 , 3 , 4 , G : = 3 , 2 , 4 , 3 , and K : = 1 , 1 , 2 , the recursive process in Theorem 3 is shown in Figure 6. For a MD-spline basis, pyramids might have varying heights.
Compared with the B-spline basis, the recursive process for the MD-spline basis is determined not only by the degrees but also by the continuous orders.
Although Theorem 3 provides an illustration of the theoretical plausibility of this design, the reality of the building itself is quite complicated. The Bernstein representation approach enables the construction of a structure, but because it is still sophisticated, it is not shown here. If a suitable construction approximation method exists, this theory will be practical.

5. Conclusions

In the paper, we present an evaluation approach for MD-splines. Unlike prior algorithms for evaluating MD-spline bases, this one is non-global, and its intermediate outcomes correspond to functions in the recursive process. Due to the absence of complicated operations, it is efficient in most cases. In addition, its numerical precision in normal degrees is comparable to that of the RKI/Greville approach. In addition to being useful for numerical evaluation, it offers a method for calculating coefficient polynomials in generalized de Boor–Cox-type relations.
Then, we provide two forms of the generalized de Boor–Cox-type formula for MD-splines. Both forms attempt to approximate the de Boor–Cox formula. The first form summarizes the majority of relationships that may appear in the recursion. The second form is a constructed structure. It is theoretically feasible, but requires a computationally cheap building technique.
It is important to note that the present value of the generalized de Boor–Cox-type formula is theoretical, but the preceding numerical algorithm has practical applicability. The second form of the generalized formula has potential because it simply has to address the construction problem. Future work might be devoted to the optimization of the numerical algorithm and the search for better construction techniques.

Author Contributions

Investigation, X.M. and W.S.; methodology, X.M. and W.S.; software, X.M.; writing—original draft preparation, X.M. and W.S.; writing—review and editing, X.M. and W.S.; funding acquisition, W.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China (No. 61772013).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Carnicer, J.; Peña, J.M. Totally positive bases for shape preserving curve design and optimality of B-splines. Comput. Aided. Geom. Design 1994, 11, 633–654. [Google Scholar] [CrossRef]
  2. Shen, W.; Wang, G. Changeable degree spline basis functions. J. Comput. Appl. Math. 2010, 234, 2516–2529. [Google Scholar] [CrossRef] [Green Version]
  3. Nürnberger, G.; Schumaker, L.L.; Sommer, M.; Strauss, H. Generalized Chebyshevian splines. SIAM J. Math. Anal. 1984, 15, 790–804. [Google Scholar] [CrossRef]
  4. Costantini, P.; Goodman, T.N.T.; Manni, C. Constructing C³ shape-preserving interpolating space curves. Adv. Comput. Math. 2001, 14, 103–127. [Google Scholar] [CrossRef]
  5. Costantini, P.; Manni, C. Shape-preserving C³ Interpolation: The Curve Case. Adv. Comput. Math. 2003, 18, 41–63. [Google Scholar] [CrossRef]
  6. Kaklis, P.D.; Pandelis, D.G. Convexity-preserving polynomial splines of non-uniform degree. IMA J. Numer. Anal. 1990, 10, 455–468. [Google Scholar] [CrossRef]
  7. Costantini, P. Variable degree polynomial splines. In Curves and Surfaces with Applications in CAGD; Vanderbilt University Press: Nashville, TN, USA, 1997; pp. 85–94. [Google Scholar]
  8. Costantini, P. Curve and surface construction using variable degree polynomial splines. Comput. Aided. Geom. Design 2000, 17, 419–446. [Google Scholar] [CrossRef]
  9. Sederberg, T.W.; Zheng, J.; Song, X. Knot intervals and multi-degree splines. Comput. Aided. Geom. Design 2003, 20, 455–468. [Google Scholar] [CrossRef] [Green Version]
  10. Wang, G.Z.; Deng, C.Y. On the degree elevation of B-spline curves and corner cutting. J Comput. Aided. Geom. Design 2007, 24, 90–98. [Google Scholar] [CrossRef]
  11. Shen, W.; Wang, G. A basis of multi-degree splines. Comput. Aided. Geom. Design 2010, 27, 23–35. [Google Scholar] [CrossRef]
  12. Shen, W.; Wang, G.; Yin, P. Explicit representations of changeable degree spline basis functions. J. Comput. Appl. Math. 2013, 238, 39–50. [Google Scholar] [CrossRef] [Green Version]
  13. Shen, W.; Yin, P.; Tang, C. Degree elevation of changeable degree spline. J. Comput. Appl. Math. 2016, 300, 56–67. [Google Scholar] [CrossRef]
  14. Beccari, C.V.; Casciola, G.; Morigi, S. On multi-degree splines. Comput. Aided. Geom. Design 2017, 58, 8–23. [Google Scholar] [CrossRef]
  15. Buchwald, B.; Mühlbach, G. Construction of B-splines for generalized spline spaces generated from local ECT-systems. J. Comput. Appl. Math. 2003, 159, 249–267. [Google Scholar] [CrossRef] [Green Version]
  16. Speleers, H. Algorithm 999: Computation of multidegree B-splines. ACM. Trans. Math. Softw. 2019, 45, 1–15. [Google Scholar] [CrossRef] [Green Version]
  17. Toshniwal, D.; Speleers, H.; Hiemstra, R.R.; Manni, C.; Hughes, T.J. Multi-degree B-splines: Algorithmic computation and properties. Comput. Aided. Geom. Design 2020, 76, 101792. [Google Scholar] [CrossRef]
  18. Hiemstra, R.R.; Hughes, T.J.; Manni, C.; Speleers, H.; Toshniwal, D. A Tchebycheffian extension of multi-degree B-splines: Algorithmic computation and properties. SIAM. J. Numer. Anal. 2020, 2, 1138–1163. [Google Scholar] [CrossRef]
  19. Beccari, C.V.; Casciola, G. Matrix representations for multi-degree B-splines. J. Comput. Appl. Math. 2021, 381, 113007. [Google Scholar] [CrossRef]
  20. Beccari, C.V.; Casciola, G. Stable numerical evaluation of multi-degree B-splines. J. Comput. Appl. Math. 2022, 400, 113743. [Google Scholar] [CrossRef]
  21. De Boor, C. On calculating with B-splines. J. Abbr. 1972, 6, 50–62. [Google Scholar] [CrossRef]
  22. Cox, M. The numerical evaluation of B-splines. J. Inst. Math. Appl. 1972, 10, 134–149. [Google Scholar] [CrossRef]
  23. Goldman, R. Pyramid Algorithms: A Dynamic Programming Approach to Curves and Surfaces for Geometric Modeling. In The Morgan Kaufmann Series in Computer Graphics; Morgan Kaufmann Publishers, Academic Press: San Diego, CA, USA, 2002; pp. 347–443. [Google Scholar]
  24. Beccari, C.V.; Casciola, G.A. Cox-de Boor-type recurrence relation for C¹ multi-degree splines. Comput. Aided. Geom. Design 2019, 75, 101784. [Google Scholar] [CrossRef]
  25. Li, X.; Huang, Z.J.; Liu, Z. A geometric approach for multi-degree spline. J. Comput. Sci. Tech. 2012, 27, 841–850. [Google Scholar] [CrossRef]
  26. Farouki, R.T. The Bernstein polynomial basis: A centennial retrospective. Comput. Aided. Geom. Design 2012, 29, 379–419. [Google Scholar] [CrossRef]
Figure 1. Original partition T , left and right extended partitions S and X , respectively.
Figure 1. Original partition T , left and right extended partitions S and X , respectively.
Mathematics 11 00367 g001
Figure 2. An example of C 0 multi-degree spline basis functions.
Figure 2. An example of C 0 multi-degree spline basis functions.
Mathematics 11 00367 g002
Figure 3. The setting of Example 2, and the support interval of N 3 , 4 is plotted in red.
Figure 3. The setting of Example 2, and the support interval of N 3 , 4 is plotted in red.
Mathematics 11 00367 g003
Figure 4. (a) Representation functions N 5 , 2 , N 6 , 2 , N 7 , 2 , N 8 , 2 . (b) Corresponding coefficient polynomials f 5 , 2 , f 6 , 2 , f 7 , 2 , f 8 , 2 . (c) Representation functions N 5 , 2 , N 6 , 2 , N 6 , 3 , N 7 , 3 . (d) Corresponding coefficient polynomials f 5 , 2 , f 6 , 2 , f 6 , 3 , f 7 , 3 .
Figure 4. (a) Representation functions N 5 , 2 , N 6 , 2 , N 7 , 2 , N 8 , 2 . (b) Corresponding coefficient polynomials f 5 , 2 , f 6 , 2 , f 7 , 2 , f 8 , 2 . (c) Representation functions N 5 , 2 , N 6 , 2 , N 6 , 3 , N 7 , 3 . (d) Corresponding coefficient polynomials f 5 , 2 , f 6 , 2 , f 6 , 3 , f 7 , 3 .
Mathematics 11 00367 g004
Figure 5. Pyramids for B-spline basis.
Figure 5. Pyramids for B-spline basis.
Mathematics 11 00367 g005
Figure 6. Pyramids for MD-spline basis.
Figure 6. Pyramids for MD-spline basis.
Mathematics 11 00367 g006
Table 1. Sequences T , G , K for Tests.
Table 1. Sequences T , G , K for Tests.
TGK
Test 1 0 , 1 , 3 , 7 , 9 , 10 6 , 5 , 5 , 4 , 5 5 , 4 , 3 , 4
Test 2 10 6 , 10 6 + 1 , 0 , 10 6 1 , 10 6 5 , 3 , 3 , 5 3 , 2 , 3
Test 3 3 j , j = 0 , . . . , 12 j , j = 10 , . . . , 21 j , j = 8 , . . . , 18
Test 4 2 × j , j = 0 , . . . , 40 j , j = 1 , . . . , 40 j , j = 0 , . . . , 38
Table 2. Algorithm 1 numerical results of Example 3 in Test 1.
Table 2. Algorithm 1 numerical results of Example 3 in Test 1.
t’Exact’ N 5 ( t ) Relative Error’Numerical’ N 5 ( t ) Relative Error
2 1.673419034377224 × 10 1 0 1.673419034377223 × 10 1 3.1616 × 10 16
3 3.951056203260072 × 10 1 0 3.951056203260071 × 10 1 3.0341 × 10 16
5 3.797960943382186 × 10 1 0 3.797960943382184 × 10 1 5.0188 × 10 16
7 5.419134913010994 × 10 2 0 5.419134913010981 × 10 2 2.3148 × 10 15
Table 3. Comparison of Algorithm 1 and Algorithm 2 numerical results in Test 2.
Table 3. Comparison of Algorithm 1 and Algorithm 2 numerical results in Test 2.
tAlg 2 N 5 ( t ) Relative ErrorAlg 1 N 5 ( t ) Relative Error
−999,9994.500002750000809 × 10 13 2.2439 × 10 16 4.500002750000810 × 10 13 4.4877 × 10 16
05.000000833333360 × 10 1 2.2204 × 10 16 5.000000833333362 × 10 1 2.2204 × 10 16
999,9994.500002750000809 × 10 13 2.2439 × 10 16 4.499733918805759 × 10 13 5.9740 × 10 5
Table 4. Comparison of Algorithm 2 and RKI/Greville method numerical results in Test 3.
Table 4. Comparison of Algorithm 2 and RKI/Greville method numerical results in Test 3.
tAlg 2 N 17 ( t ) Relative ErrorRKI/Greville N 17 ( t ) Relative Error
272.015443122101803 × 10 15 3.5939 × 10 15 2.015443122101811 × 10 15 1.9570 × 10 16
2436.858212462569680 × 10 4 3.1905 × 10 15 6.858212462569703 × 10 4 1.5809 × 10 16
7291.743353153410859 × 10 1 7.3071 × 10 16 1.743353153410862 × 10 1 6.3683 × 10 16
21873.858286138702032 × 10 1 3.6662 × 10 16 3.858286138702034 × 10 1 8.6325 × 10 16
65612.453976654577640 × 10 3 3.9579 × 10 16 2.453976654577639 × 10 3 1.7672 × 10 16
Table 5. Running time in different tests.
Table 5. Running time in different tests.
TestAlg 2 (s)Alg 2 Global (s)RKI/Greville (s)
Test 10.0910.1060.117
Test 20.0880.0980.101
Test 30.1050.2540.301
Test 40.2051.2943.070
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ma, X.; Shen, W. Generalized de Boor–Cox Formulas and Pyramids for Multi-Degree Spline Basis Functions. Mathematics 2023, 11, 367. https://doi.org/10.3390/math11020367

AMA Style

Ma X, Shen W. Generalized de Boor–Cox Formulas and Pyramids for Multi-Degree Spline Basis Functions. Mathematics. 2023; 11(2):367. https://doi.org/10.3390/math11020367

Chicago/Turabian Style

Ma, Xu, and Wanqiang Shen. 2023. "Generalized de Boor–Cox Formulas and Pyramids for Multi-Degree Spline Basis Functions" Mathematics 11, no. 2: 367. https://doi.org/10.3390/math11020367

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop