Efficient modified Jacobi-Bernstein basis transformations
Przemys{\l}aw Gospodarczyk, Pawe{\l} Wo\'zny

TL;DR
This paper introduces an efficient $O(n^2)$ algorithm for transforming between modified Jacobi and Bernstein bases, significantly improving the degree reduction process of Bézier curves over previous $O(n^3)$ methods.
Contribution
The paper presents a novel $O(n^2)$ transformation algorithm between modified Jacobi and Bernstein bases, enhancing the efficiency of polynomial degree reduction in Bézier curves.
Findings
Transformations performed with $O(n^2)$ complexity
Algorithm significantly faster in practice
Improved degree reduction of Bézier curves
Abstract
In the paper, we show that the transformations between modified Jacobi and Bernstein bases of the constrained space of polynomials of degree at most can be performed with the complexity . As a result, the algorithm of degree reduction of B\'ezier curves that was first presented in (Bhrawy et al., J. Comput. Appl. Math. 302 (2016), 369--384), and then corrected in (Lu and Xiang, J. Comput. Appl. Math. 315 (2017), 65--69), can be significantly improved, since the necessary transformations are done in those papers with the complexity . The comparison of running times shows that our transformations are also faster in practice.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Numerical Analysis Techniques · Polynomial and algebraic computation · Digital Filter Design and Implementation
∎
11institutetext: P. Gospodarczyk (Corresponding author) 22institutetext: Institute of Computer Science, University of Wrocław, ul. F. Joliot-Curie 15, 50-383 Wrocław, Poland
Fax: +48713757801
22email: [email protected] 33institutetext: P. Woźny 44institutetext: Institute of Computer Science, University of Wrocław, ul. F. Joliot-Curie 15, 50-383 Wrocław, Poland
44email: [email protected]
Efficient modified Jacobi-Bernstein basis transformations
Przemysław Gospodarczyk
Paweł Woźny
(March 18, 2024)
Abstract
In the paper, we show that the transformations between modified Jacobi and Bernstein bases of the constrained space of polynomials of degree at most can be performed with the complexity . As a result, the algorithm of degree reduction of Bézier curves that was first presented in (Bhrawy et al., J. Comput. Appl. Math. 302 (2016), 369–384), and then corrected in (Lu and Xiang, J. Comput. Appl. Math. 315 (2017), 65–69), can be significantly improved, since the necessary transformations are done in those papers with the complexity . The comparison of running times shows that our transformations are also faster in practice.
Keywords:
Bernstein polynomials modified Jacobi polynomials Hahn polynomials dual Hahn polynomials degree reduction of Bézier curves
1 Introduction
Recently, Bhrawy et al. B16 presented an algorithm of degree reduction of Bézier curves with parametric continuity constraints. In LX16 , Lu and Xiang corrected that algorithm. Moreover, they solved the problem of degree reduction of Bézier curves with geometric continuity constraints by extending the original algorithm. Both methods of degree reduction are based on transformations between modified Jacobi and Bernstein bases of the constrained space of polynomials of degree at most . Those transformations are computed in B16 ; LX16 with the complexity (see (LX16, , Theorems 1 and 2)).
In Woz13 , efficient transformations between shifted Jacobi and Bernstein bases of the unconstrained space of polynomials of degree at most were proposed. The idea was to consider the connection coefficients written in terms of Hahn polynomials. Those representations were given by Ciesielski Cie87 and Ronveaux et al. R98 . Then, recurrence relations for the coefficients were obtained using recurrence relations for Hahn polynomials. Consequently, the transformations in Woz13 , which can be used in a method of unconstrained degree reduction of Bézier curves, are performed with the complexity . Unfortunately, it seems that those results have not been noticed by the CAGD community. Perhaps because in CAGD we often look for an optimal element (e.g., a degree reduced curve) that is constrained by some continuity conditions. As a result, transformations between bases of the constrained space of polynomials are more useful. Therefore, the main goal of this paper is to recall the approach from Woz13 and generalize it in order to give methods of computing the transformations between modified Jacobi and Bernstein bases with the lowest complexity among existing algorithms, namely . The new results significantly improve the methods of constrained degree reduction of Bézier curves from B16 ; LX16 .
In Doh14 , Doha et al. proposed an algorithm of constrained degree reduction of Bézier curves based on the generalized Jacobi-Bernstein basis transformations. However, those transformations are performed there with the complexity . Since the generalized Jacobi polynomials are closely related to the shifted Jacobi polynomials, we notice that the searched connection coefficients depend on Hahn polynomials. Consequently, they can be computed with the complexity using recurrence relations similar to the ones that we present for the modified Jacobi-Bernstein basis transformations.
The paper is organized as follows. In Section 2, we recall some useful definitions and properties. Next, we give two different recurrence relations for the coefficients of the Bernstein form of the modified Jacobi polynomials (see Section 3). As a result, there are two different ways of computing those coefficients. Both methods have the complexity . In Section 4, we solve the reverse problem, i.e., we propose two different methods of computing the coefficients of the modified Jacobi form of the Bernstein polynomials. Once again, our algorithms have the complexity and they are based on recurrence relations. Moreover, a remark on the generalized Jacobi-Bernstein basis transformations is made. In Section 5, we compare the running times of our methods with the running times of the methods from B16 ; LX16 . Section 6 concludes the paper.
2 Preliminaries
2.1 Bernstein and shifted Jacobi bases of the unconstrained space of polynomials
Let be the space of polynomials of degree at most . As is known, Bernstein polynomials of degree ,
[TABLE]
form a basis of this space. The shifted Jacobi polynomials,
[TABLE]
where
[TABLE]
form a different basis of . In contrast to Bernstein polynomials, they are orthogonal with respect to the Jacobi inner product
[TABLE]
and, as a result, more useful in the context of degree reduction of polynomial curves with respect to the weighted -norm. In Woz13 , one of us presented efficient methods of conversion between shifted Jacobi and Bernstein bases. Those algorithms have the complexity . See also CW02 ; Cie87 ; Doh14 ; Far00 ; LZ98 ; Rab03 ; Rab04 ; R98 ; Sun05 .
2.2 Bernstein and modified Jacobi bases of the constrained space of polynomials
In order to solve the problem of degree reduction of Bézier curves with continuity constraints at the endpoints, it is useful to consider the following restriction of the space (see, e.g., GLW15 ; GLW17 ; WL09 ). Let , where and are nonnegative integers such that , be the space of all polynomials of degree at most , whose derivatives of order less than at , as well as derivatives of order less than at , vanish:
[TABLE]
As is known, , and the following Bernstein polynomials:
[TABLE]
(cf. (2.1)) form a basis of this space. Observe that . Recall that the constrained problem of degree reduction of Bézier curves is often formulated as a minimization problem of the weighted -distance (see, e.g., HB16 ; B16 ; Doh14 ; GLW15 ; LX16 ; WL09 ). Therefore, an orthogonal basis of the space with respect to the inner product (2.3) can play a crucial role in that context. Since Bernstein polynomials (2.4) are not orthogonal, a different basis is needed. In B16 , Bhrawy et al. introduced the modified Jacobi polynomials,
[TABLE]
(cf. (2.2)), which form an orthogonal basis of the space with respect to the inner product (2.3). In this paper, we generalize the results from Woz13 in order to show that the transformations between the modified Jacobi (2.5) and Bernstein bases (2.4) can be done with the complexity . More precisely, we give methods of computing the connection coefficients and that satisfy
[TABLE]
Recall that these coefficients were first given in B16 , and then corrected in LX16 , namely
[TABLE]
where
[TABLE]
and the binomial coefficients are generalized to noninteger arguments,
[TABLE]
with being the gamma function (see, e.g., (AAR99, , Section 1.1)). However, such an approach leads to the complexity . Moreover, cumbersome computations of the gamma functions are required. As we shall see, our methods are not only more efficient but also avoid computing the gamma functions.
2.3 Hahn and dual Hahn polynomials
Now, we give a short introduction to Hahn and dual Hahn polynomials because they are main tools in our efficient methods of modified Jacobi-Bernstein basis transformations.
Hahn polynomials are given by
[TABLE]
where . They are orthogonal with respect to a discrete inner product (see (KS98, , (1.5.2))), and satisfy a three-term recurrence relation (see, e.g., (KS98, , (1.5.3))),
[TABLE]
where ,
[TABLE]
Further on in the paper, we will need the following symmetry property (see, e.g., (AAR99, , p. 346)):
[TABLE]
Dual Hahn polynomials are given by
[TABLE]
where and . They are orthogonal with respect to a discrete inner product (see (KS98, , (1.6.2))), and satisfy a three-term recurrence relation (see, e.g., (KS98, , (1.6.3))),
[TABLE]
where ,
[TABLE]
As is known, Hahn and dual Hahn polynomials are related (see, e.g., (KS98, , Section 1.6)),
[TABLE]
3 Bernstein form of modified Jacobi polynomials
The following lemma is a generalization of the result from Cie87 , where the classic Jacobi polynomials on the interval were considered, and from Woz13 , where the shifted Jacobi polynomials (2.2) were studied which corresponds to the case without any constraints, i.e., (see (2.5)).
Lemma 3.1.
Modified Jacobi polynomials (2.5) have the following representation in the Bernstein basis (2.4):
[TABLE]
where
[TABLE]
Proof.
According to (Woz13, , Theorem 3.1), shifted Jacobi polynomials (2.2) have the following Bernstein form:
[TABLE]
where
[TABLE]
Notice that the use of the symmetry property (2.11) in (3.3) results in
[TABLE]
Now, suitable substitutions and indices manipulations in (3.2) give us
[TABLE]
Then, we multiply both sides of the equation (3.4) by , use (2.5), and after some algebra, we get
[TABLE]
which completes the proof. ∎
In Theorems 3.2 and 3.3, we give two different recurrence relations for the connection coefficients . As a result, there are two different methods of computing those coefficients. Notice that both methods have the complexity . Recall that a similar recurrence relation for the unconstrained case was given in (Woz13, , Lemma 4.1).
Theorem 3.2.
For a fixed , the connection coefficients given by (3.1) satisfy the following recurrence relation:
[TABLE]
where
[TABLE]
with
[TABLE]
Proof.
According to Lemma 3.1, the coefficients can be represented using Hahn polynomials. Since Hahn and dual Hahn polynomials are related (see (2.14)), we obtain
[TABLE]
(cf. (3.1)). Then, it can be checked that (3.5) and (3.6) follow from (3.9) for , respectively (see (2.12)). Finally, the application of the recurrence relation (2.13) to (3.9), along with some algebra, gives (3.7). ∎
Theorem 3.3.
For a fixed , the connection coefficients given by (3.1) satisfy the following recurrence relation:
[TABLE]
where is given by (3.8),
[TABLE]
with
[TABLE]
(cf. Theorem 3.2).
Proof.
Recall that the coefficients can be represented using Hahn polynomials (see Lemma 3.1). Consequently, (3.10) and (3.11) are obtained from (3.1) by setting , respectively (see (2.9)). Finally, we apply the recurrence relation (2.10) to (3.1), and then some manipulations lead us to (3.12). ∎
4 Modified Jacobi form of Bernstein polynomials
First of all, we notice that the connection coefficients in (2.6) can be represented using Hahn polynomials (2.9). The following lemma is a generalization of the result from R98 (see also Woz13 ), where only the unconstrained case (see (2.5)) was considered. More precisely, Bernstein polynomials (2.1) were represented in the monic shifted Jacobi basis (cf. (2.2)).
Lemma 4.1.
Bernstein polynomials (2.4) have the following representation in the modified Jacobi basis (2.5):
[TABLE]
where
[TABLE]
with
[TABLE]
and as defined in (3.8).
Proof.
First, we recall the shifted Jacobi form of Bernstein polynomials (2.1) (see (Woz13, , Theorem 3.2)),
[TABLE]
where
[TABLE]
Then, appropriate substitutions and indices manipulations in (4.5) lead us to
[TABLE]
Next, we multiply both sides of the equation (4.7) by ,
[TABLE]
and finally obtain the equations (4.1)–(4.4) by substituting (2.5) into (4). ∎
Remark 4.2.
Notice that the formula (4.2) relating the coefficients with Hahn polynomials is a bit more complicated than the analogous formula from the previous section (cf. (3.1)). Therefore, our goal is to first compute separately the quantities and using recurrence relations, and then to obtain using (4.2).
In Theorems 4.3 and 4.4, we give two different recurrence relations for each quantities and . Consequently, there are two different methods of computing the connection coefficients . Observe that both methods have the complexity . Recall that the unconstrained case was solved in (Woz13, , Lemma 4.2) using a similar approach.
Theorem 4.3.
For a fixed , the quantities given by (4.3) satisfy the following recurrence relation:
[TABLE]
and the quantities given by (4.4) satisfy
[TABLE]
where is defined by (3.8),
[TABLE]
Proof.
The formula (4.9) follows from (4.3) for . The relation (4.10) can be easily proved by induction. By setting in (4.4) (see also (2.9)), we obtain (4.11). Finally, the application of the recurrence relation (2.10) to (4.4), combined with some algebraic manipulation, gives (4.12). ∎
Theorem 4.4.
For a fixed , the quantities given by (4.3) satisfy the following recurrence relation:
[TABLE]
and the quantities given by (4.4) satisfy
[TABLE]
where is defined by (3.8),
[TABLE]
(cf. Theorem 4.3).
Proof.
The formula (4.13) is obtained from (4.3) for . The relation (4.14) can be easily proved by induction. Since Hahn and dual Hahn polynomials are related (see (2.14)), we have
[TABLE]
(cf. (4.4)). Now, it can be checked that the formulas (4.15) follow from (4.17) for (see (2.12)). The recurrence relation (4.16) is obtained, after some algebra, from (4.17) and (2.13). ∎
As a bonus, we give a relation between the connection coefficients (see (3.1)) and (see (4.2)). This is a generalization of (Woz13, , Remark 3.4), where only the case of was considered.
Proposition 4.5.
The connection coefficients (see (3.1)) and (see (4.2)) are related in the following way:
[TABLE]
where, for a fixed ,
[TABLE]
alternatively, for a fixed ,
[TABLE]
with as defined in (3.8).
Proof.
First, we apply (2.11) to (4.4). Now, we are able to compare (see (3.1)) with (see (4.2)). We notice that these coefficients depend, in a different way, on the Hahn polynomials with the same parameters. It can be checked that
[TABLE]
Obviously, (4.18) and (4.20) follow from (4.22) for and , respectively. Finally, we can easily prove (4.19) and (4.21) using induction. ∎
Remark 4.6.
In Doh14 , Doha et al. presented generalized Jacobi-Bernstein basis transformations and used them in their algorithm of constrained degree reduction of Bézier curves. However, those transformations are performed there with the complexity . Recall that the generalized Jacobi polynomials are closely related to the shifted Jacobi polynomials (2.2) in all four cases,
[TABLE]
As in the proofs of Lemmas 3.1 and 4.1, it can be shown that the connection coefficients of the generalized Jacobi-Bernstein basis transformations depend on Hahn polynomials in the following way:
[TABLE]
where and are defined by (3.3) and (4.6), respectively. Consequently, those coefficients can be computed with the complexity using recurrence relations similar to the ones presented in Theorems 3.2, 3.3, 4.3 and 4.4.
5 Examples
In this section, we compare the running times of our methods based on Theorems 3.2, 3.3, 4.3 and 4.4 with the running times of the methods from B16 ; LX16 based on equations (2.7) and (2.8). The results were obtained on a computer with Intel Core i5-3337U 1.8GHz processor and 8GB of RAM, using -digit arithmetic. worksheet containing programs and tests is available at http://www.ii.uni.wroc.pl/~pgo/papers.html.
The running times of the algorithms of computing and are given in Tables 1 and 2, respectively. For each choice of and (a row in Tables 1 and 2), each algorithm was executed for hundred times (i.e., 1100 times in total). In the tables, we present total running times of the algorithms for each choice. The following choices of and were considered:
- (i)
fixed natural choices of and (see rows 1–5 of Tables 1 and 2);
- (ii)
1100 random pairs (see row 6 of Tables 1 and 2);
- (iii)
for each , ; (see row 7 of Tables 1 and 2).
For all tests, we set .
Clearly, our methods are significantly faster than the methods from B16 ; LX16 in all considered cases. Observe that the differences are very large in row 6 of Table 1, and rows 6, 7 of Table 2. This is not only because of the difference in computational complexity but also because of some cumbersome computations of the gamma functions that are required by the methods from B16 ; LX16 (see (2.7) and (2.8)).
6 Conclusions
In the paper, we present efficient transformations between modified Jacobi and Bernstein bases of the constrained space of polynomials of degree at most . We notice that the searched connection coefficients can be written in terms of Hahn and dual Hahn polynomials, which results in fast methods of computing them using recurrence relations. The idea is a generalization of the one from Woz13 , where only the unconstrained case of the problem was solved. Our new methods have the complexity , whereas the complexity of other existing algorithms is (see B16 ; LX16 ). Moreover, the comparison of running times shows that our methods are also faster in practice. Consequently, the methods of constrained degree reduction of Bézier curves from B16 ; LX16 can be significantly improved.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] R. Ait-Haddou, M. Bartoň, Constrained multi-degree reduction with respect to Jacobi norms, Computer Aided Geometric Design 42 (2016), 23–30.
- 2[2] G. E. Andrews, R. Askey, R. Roy, Special functions, Cambridge University Press, Cambridge, 1999.
- 3[3] A. H. Bhrawy, E. H. Doha, M. A. Saker, D. Baleanu, Modified Jacobi-Bernstein basis transformation and its application to multi-degree reduction of Bézier curves, Journal of Computational and Applied Mathematics 302 (2016), 369–384.
- 4[4] G.-D. Chen, G.-J. Wang, Optimal multi-degree reduction of Bézier curves with constraints of endpoints continuity, Computer Aided Geometric Design 19 (2002), 1365–1377.
- 5[5] Z. Ciesielski, Explicit formula relating the Jacobi, Hahn and Bernstein polynomials, SIAM Journal on Mathematical Analysis 18 (1987), 1573–1575.
- 6[6] E. H. Doha, A. H. Bhrawy, M. A. Saker, On generalized Jacobi-Bernstein basis transformation: application of multidegree reduction of Bézier curves and surfaces, Journal of Computing and Information Science in Engineering 14 (2014), 041010.
- 7[7] R. T. Farouki, Legendre-Bernstein basis transformations, Journal of Computational and Applied Mathematics 119 (2000), 145–160.
- 8[8] P. Gospodarczyk, S. Lewanowicz, P. Woźny, G k , l superscript 𝐺 𝑘 𝑙 G^{k,l} -constrained multi-degree reduction of Bézier curves, Numerical Algorithms 71 (2016), 121–137.
