Theory and Modern Applications

# Approximate multi-degree reduction of Q-Bézier curves via generalized Bernstein polynomial functions

## Abstract

Quasi Bézier curves (or QB-curves, for short) possess the excellent geometric features of classical Bézier curves and also have good shape adjustability. In this paper, an algorithm for a multi-degree reduction of QB-curves based on $$L_{2}$$ norm and by the analysis of geometric characteristics of QB-curves is constructed. The approximating approach for QB-curves of degree $$n+1$$ by degree m ($$m\leq n$$) is also given. Secondly, by solving the linear equations under the constraints of $$C^{0}$$ and $$C^{1}$$ and without constraints, the explicit expression of the points of the approximating curve is obtained, which minimizes the error between the original curve and the approximating curve using the least square method. Some numerical examples of degree reduction under different constraints are given, and the corresponding errors are calculated as well. The results show that this method can be easily implemented, is highly precise and very effective.

## 1 Introduction

A parametric curve, such as Bézier curve, is a fundamental tool and research content in the field of Computer Aided Geometric Design (CAGD)/Computer Aided Manufacturing (CAM). It plays a major role in geometric modeling of various products, shape designing, sketching, etc. It has also become one of the most significant schemes for representing curves in Computer Aided Design (CAD)/CAM systems due to straightforward, instinctive construction and several significant characteristics of a Bézier curve. In engineering applications and modeling the shape of a Bézier curve is not sufficient because it is uniquely determined by the control points. Researchers introduced a rational Bézier curve for modification or adjustment of the shape of curves without changing the control points with the help of weight factor to overcome this shortcoming. However, many problems occur when we solve these rational factors such as computational complexity, repeated derivation, inconvenient integration, and so on .

To defeat these problems and to get better approximation to real curves, researchers have introduced many Bézier curves in non-rational form (including trigonometric, polynomial, and hybrid trigonometric Bézier curves) with shape parameters . In , generalized Bernstein basis functions were used to construct a QB-curve with multiple shape parameters. The curve of this kind also possesses several significant geometric characteristics of classical Bézier curves, and it also has bendable shape modification, i.e., the shape of a curve can be adjusted by altering the values of shape parameters to construct more complicate curves of the same degree. This makes QB-curves extensively used in different modelings and CAD/CAM systems and has certain application value in describing curves and surfaces. Hu et al. presented the continuity conditions of the smooth splicing of two adjacent QB-curves G1 and G2 and analyzed the result of shape parameters on the shape of the combined curves after splicing . In , the continuity constraints for QB surfaces of degree $$(m, n)$$ are studied by using the end point properties of generalized QB basis functions. As far as we are aware, the research on a QB curve regarding its degree reduction has not been reported before.

For the degree of curves, different CAD/CAM systems have different requirements. It is necessary to reduce the degree of curves to realize the data conversion and transmission between curves of different degree. There are two types of methods for degree reduction of curves: (a) first is the geometric method which is based on control points. The inverse process of degree elevation is used to solve the control points of degree reduction curves in . Young et al. used the geometric properties of a Bézier curve and combined them with generalized inverse matrix and least squares theory to achieve degree reduction approximation [33, 34]. (b) The second type is the algebraic method which is based on basis transformation. The degree reduction of a Bézier curve is achieved by Chebyshev-basis transformation [35, 36], and the best approximation degree reduction problem is studied by using Legendre polynomial theory . Xu et al. presented a method for degree reduction of a Bézier curve based on constrained Jacobi polynomials . Li et al.  constructed some geometric continuity conditions for the generalized cubic H-Bézier model for the purpose of constructing shape-controlled complex curves and surfaces in engineering. The authors in [40, 41] constructed generalized trigonometric Bézier curves with shape parameters for the purpose of constructing some complex curves and surface applications in engineering. The basis functions proposed in  are different from the basis functions utilized in this study.

In this paper, based on $$L_{2}$$-norm, the least square of mth-degree QB-curves is used to approximate $$n+1$$th-degree QB-curves. The degree reduction without constraints and under $$C^{0}$$, and $$C^{1}$$ constraints is considered. The specific expression for calculating the degree reduction of curves control points is given.

## 2 The definition of QB-curves

Let $$\mathrm{P}_{i} \in \mathbb{R}^{d}$$, $$i = 0,1, \ldots ,n$$ and $$d = 2,3$$, be the set of control points, and its corresponding polynomial curve with shape parameters $$\{ \lambda _{i} \} _{i = 1}^{n}$$ of degree n is called QB curve, which can be defined as follows:

$$\mathbf{r}(\theta ) = \sum_{i = 0}^{n} \mathrm{P}_{i}b_{i,n}(\theta ),$$
(1)

where nth-degree basis function $$\{b_{0,n}(\theta ),b_{1,n}(\theta ),\dots ,b_{n,n}(\theta )\}$$ is the nth-degree QB basis functions with shape parameters $$\{ \lambda _{i} \} _{i = 1}^{n}$$, the specific form is 

$\left\{\begin{array}{c}{b}_{0,n}\left(\theta \right)={\left(1-\theta \right)}^{n}\left(1-{\lambda }_{1}\theta \right),\hfill \\ {b}_{i,n}\left(\theta \right)={\theta }^{i}{\left(1-\theta \right)}^{n-i}\left(\left(\begin{array}{c}n\\ i\end{array}\right)+{\lambda }_{i}-{\lambda }_{i}\theta -{\lambda }_{i+1}\theta \right),\phantom{\rule{1em}{0ex}}i=1,2,\dots ,\left[\frac{n}{2}\right]-1,\hfill \\ {b}_{\left[\frac{n}{2}\right]}\left(\theta \right)={\theta }^{\left[\frac{n}{2}\right]}{\left(1-\theta \right)}^{n-\left[\frac{n}{2}\right]}\left(\left(\begin{array}{c}n\\ \left[\frac{n}{2}\right]\end{array}\right)+{\lambda }_{\left[\frac{n}{2}\right]}-{\lambda }_{\left[\frac{n}{2}\right]}\theta +{\lambda }_{\left[\frac{n}{2}\right]+1}\theta \right),\hfill \\ {b}_{i,n}\left(\theta \right)={\theta }^{i}{\left(1-\theta \right)}^{n-i}\left(\left(\begin{array}{c}n\\ i\end{array}\right)-{\lambda }_{i}+{\lambda }_{i}\theta +{\lambda }_{i+1}\theta \right),\phantom{\rule{1em}{0ex}}i=\left[\frac{n}{2}\right]+1,\dots ,n-1,\hfill \\ {b}_{n,n}\left(\theta \right)={\theta }^{n}\left(1-{\lambda }_{n}+{\lambda }_{n}\theta \right)\hfill \end{array}$
(2)

with

\begin{aligned}& \lambda _{i} \in \left [ - \begin{pmatrix} n \\ i \end{pmatrix}, \begin{pmatrix} n \\ i - 1 \end{pmatrix} \right ], \quad i = 1,2, \ldots , \biggl[ \frac{n}{2} \biggr], \\& \lambda _{i} \in \left [ - \begin{pmatrix} n \\ i - 1 \end{pmatrix}, \begin{pmatrix} n \\ i \end{pmatrix} \right ], \quad i = \biggl[ \frac{n}{2} \biggr] + 1, \ldots ,n. \end{aligned}

Here

$$\biggl[ \frac{n}{2} \biggr] = \textstyle\begin{cases} \frac{n}{2},&\text{if } n \mbox{ is even}, \\ \frac{n + 1}{2},& \text{if } n \mbox{ is odd}, \end{cases}\displaystyle \quad \theta \in [ 0,1 ].$$

## 3 Problem description

### Problem 1

Let us consider that the $$n+1$$th-degree QB curve determined by control points $$\{ \mathrm{P}_{i}^{*} \} _{i = 0}^{n + 1} \in \mathbb{R}^{d}$$, $$d = 2,3$$, has the following form:

$$\mathbf{r}^{*}(\theta ) = \sum_{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}(\theta ),$$
(3)

where $$\{ b_{i,n + 1}(\theta )\}_{i = 0}^{n + 1}$$ are $$n+1$$th degree QB basis functions. The degree reduction of the so-called QB curve refers to finding the low mth-degree QB curve ($$m\leq n$$) whose control points are $$\{ \mathrm{P}_{i} \} _{i = 0}^{m} \in \mathbb{R}^{d}$$, $$d = 2,3$$,

$$\mathbf{r}(\theta ) = \sum_{i = 0}^{m} \mathrm{P}_{i}b_{i,m}(\theta )$$
(4)

such that the distance between the two curves is minimized under a certain distance function $$d(\mathbf{r}^{*}(\theta ),\mathbf{r}(\theta ))$$.

In order to obtain the explicit expression of an approximating QB curve, we choose to use the $$L_{2}$$-norm to measure the degree of the approximating curve before and after reduction as a whole, and define its “distance” as follows:

$$d^{2}\bigl(\mathbf{r}^{*}(\theta ),\mathbf{r}(\theta ) \bigr) = \int _{ 0}^{ 1} \bigl\Vert \mathbf{r}^{*}(\theta ) - \mathbf{r}(\theta ) \bigr\Vert _{2}^{2}\,\mathrm{d}\theta .$$
(5)

The above equation is a vector function, and the labels $$\mathbf{r}^{*}(\theta ) = (\mathrm{r}_{1}^{*}(\theta ),\mathrm{r}_{2}^{*}(\theta ),\ldots,\mathrm{r}_{s}^{*}(\theta ))$$ and $$\mathbf{r}(\theta ) = (\mathrm{r}_{1}(\theta ),\mathrm{r}_{2}(\theta ),\ldots,\mathrm{r}_{s}(\theta ))$$ are introduced to transform the vector function into the minimized component function

$$d^{2}\bigl(\mathrm{r}_{j}^{*}(\theta ), \mathrm{r}_{j}(\theta )\bigr) = \int _{ 0}^{ 1} \bigl[\mathrm{r}_{j}^{*}( \theta ) - \mathrm{r}_{j}(\theta )\bigr]^{2} \,\mathrm{d}\theta , \quad j = 1,2,\ldots,s.$$
(6)

Thus, Eq. (5) can be determined by Eq. (7)

$$d\bigl(\mathbf{r}^{*}(\theta ),\mathbf{r}(\theta )\bigr) = \Biggl[ \sum_{j = 1}^{s} d^{2}\bigl( \mathrm{r}_{j}^{*}(\theta ),\mathrm{r}_{j}( \theta )\bigr) \Biggr]^{1/2}.$$
(7)

Therefore, when each component distance function $$d(\mathrm{r}_{j}^{*}(\theta ),\mathrm{r}_{j}(\theta ))$$ gets the minimum value, $$d(\mathbf{r}^{*}(\theta ),\mathbf{r}(\theta ))$$ reaches the minimum value. In this paper, we only discuss the minimum problem in the form of component function and introduce the problem of degree reduction from the solution problem.

### Problem 2

Let $$\{ \mathrm{P}_{i}^{*} \} _{i = 0}^{n + 1}$$ be the sequence of real numbers, and its corresponding $$n+1$$th-degree QB function can be defined as follows:

$$\mathbf{r}^{*}(\theta ) = \sum_{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}(\theta ).$$
(8)

Then we will seek real numbers $$\{ \mathrm{P}_{i} \} _{i = 0}^{m}$$ corresponding to the mth-degree QB function ($$m\leq n$$)

$$\mathbf{r}(\theta ) = \sum_{i = 0}^{m} \mathrm{P}_{i}b_{i,m}(\theta )$$
(9)

such that $$d^{2}(\mathbf{r}^{*}(\theta ),\mathbf{r}(\theta )) = \int _{ 0}^{ 1} [\mathbf{r}^{*}(\theta ) - \mathbf{r}(\theta )]^{2} \,\mathrm{d}\theta$$ minimizes by least square distance.

In order to determine the coefficients of the approximating function $$\mathbf{r} (\theta )$$, the next main purpose is to solve the unknowns $$\{ \mathrm{P}_{i}\}_{i = 0}^{m}$$.

## 4 Least squares degree reduction of QB-curves

### Theorem 1

If the coefficients $$\{ \mathrm{P}_{i}\}_{i = 0}^{m}$$are the solutions of Problem 2, then vector $$\mathbf{P}=(\mathrm{P}_{0},\mathrm{P}_{1},\dots ,\mathrm{P}_{m})^{T}$$satisfies the linear equation $$\mathbf{AP}=\mathbf{b}$$, where

$$\textstyle\begin{cases} \mathbf{A} = (a_{i,j})_{m + 1,m + 1}, \\ \mathbf{b} = (b_{1},\ldots,b_{m + 1})^{T}, \\ a_{i + 1,j + 1} = \int _{ 0}^{ 1} b_{i,m}(\theta )b_{j,m}(\theta ) \,\mathrm{d}\theta ,\\ b_{j + 1} = \int _{ 0}^{ 1} [ \sum_{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}(\theta ) ]b_{j,m}(\theta )\,\mathrm{d}\theta , \end{cases}\displaystyle (i,j = 0,1,2,\ldots,m).$$
(10)

### Proof

From Problem 2, we can get

\begin{aligned} S =& d^{2}\bigl(\mathbf{r}^{*}(\theta ),\mathbf{r}( \theta )\bigr) = \int _{ 0}^{ 1} \bigl[\mathbf{r}^{*}( \theta ) - \mathbf{r}(\theta )\bigr]^{2} \,\mathrm{d}\theta = \int _{ 0}^{ 1} \Biggl[\sum _{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}( \theta ) - \sum_{j = 0}^{m} \mathrm{P}_{j}b_{j,m}(\theta ) \Biggr]^{2} \,\mathrm{d}\theta . \end{aligned}

Let $$\partial S/\partial \mathrm{P}_{j}$$, $$j=0,1,2,\dots ,m$$, the above equation can be reduced to

$$\sum_{i = 0}^{m} \mathrm{P}_{i} \int _{ 0}^{ 1} b_{i,m}(\theta )b_{j,m}(\theta )\,\mathrm{d}\theta = \int _{ 0}^{ 1} \Biggl[ \sum _{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}( \theta ) \Biggr]b_{j,m}(\theta )\,\mathrm{d}\theta ,\quad j = 0,1,2,\ldots,m.$$
(11)

Further, Eq. (11) is expressed in a matrix form by calculation given as follows:

$$\mathbf{AP} = \mathbf{b},$$
(12)

where

$$\textstyle\begin{cases} \mathbf{A} = (a_{i,j})_{m + 1,m + 1}, \\ \mathbf{b} = (b_{1},\ldots,b_{m + 1})^{T}, \\ a_{i + 1,j + 1} = \int _{ 0}^{ 1} b_{i,m}(\theta )b_{j,m}(\theta ) \,\mathrm{d}\theta ,\\ b_{j + 1} = \int _{ 0}^{ 1} [ \sum_{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}(\theta ) ]b_{j,m}(\theta )\,\mathrm{d}\theta , \end{cases}\displaystyle (i,j = 0,1,2,\ldots,m).$$
(13)

Let $$\mathbf{e}_{j + 1} = (a_{1,j + 1},\ldots,a_{m + 1,j + 1})^{T}$$ ($$j = 0,1,2,\ldots,m$$), set

$$\sum_{j = 0}^{m} c_{j + 1} \mathbf{e}_{j + 1} = c_{1} \begin{bmatrix} a_{1,1} \\ a_{2,1} \\ \vdots \\ a_{m + 1,1} \end{bmatrix} + c_{2} \begin{bmatrix} a_{1,2} \\ a_{2,2} \\ \vdots \\ a_{m + 1,2} \end{bmatrix} + \cdots + c_{m + 1} \begin{bmatrix} a_{1,m + 1} \\ a_{2,m + 1} \\ \vdots \\ a_{m + 1,m + 1} \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ \vdots \\ 0 \end{bmatrix},$$
(14)

that is,

$$\sum_{j = 0}^{m} c_{j + 1}a_{i + 1,j + 1} = \int _{ 0}^{ 1} \Biggl[ \sum _{j = 0}^{m} c_{j + 1}b_{j,m}( \theta ) \Biggr]b_{i,m}(\theta ) \,\mathrm{d}\theta = 0,\quad i = 0,1,2, \ldots,m.$$
(15)

It can be obtained as follows:

\begin{aligned} \int _{ 0}^{ 1} \Biggl[ \sum _{j = 0}^{m} c_{j + 1}b_{j,m}( \theta ) \Biggr]^{2} \,\mathrm{d}\theta =& \int _{ 0}^{ 1} \Biggl[ \sum _{j = 0}^{m} c_{j + 1}b_{j,m}( \theta ) \Biggr] \Biggl[ \sum_{i = 0}^{m} c_{i + 1}b_{i,m}(\theta ) \Biggr]\,\mathrm{d}\theta \\ = &\sum_{i = 0}^{m} c_{i + 1} \int _{ 0}^{ 1} \Biggl[ \sum _{j = 0}^{m} c_{j + 1}b_{j,m}( \theta ) \Biggr] b_{i,m}(\theta ) \,\mathrm{d}\theta \\ =& 0. \end{aligned}
(16)

Therefore $$\sum_{j = 0}^{m} c_{j + 1}b_{j,m}(\theta ) = 0$$. Since $$\{b_{0,m}(\theta ),\dots ,b_{m ,m}(\theta )\}$$ are linearly independent on $$\theta \in[0,1]$$, $$c_{j+1}\equiv 0$$ ($$j=0,1,2,\dots ,m$$), that is, vector $$\{e_{1},\dots ,e_{m+1}\}$$ is linearly independent. Therefore, the solution of linear Eq. (12) exists and is unique. □

### 4.2 Degree reduction of QB-curves by $$C^{0}$$ continuity conditions

To reduce the degree of the curves, if the $$C^{0}$$ continuity is satisfied, that is, the first and last points of the two curves coincide, then there are

$$\mathrm{P}_{0} = \mathrm{P}_{0}^{*},\qquad \mathrm{P}_{m} = \mathrm{P}_{n + 1}^{*}.$$

The remaining $$m - 1$$ points are calculated according to Theorem 2.

### Theorem 2

If coefficients $$\{ \mathrm{P}_{i}\}_{i = 0}^{m}$$are the solutions of Problem 2and keep $$C^{0}$$continuous, then vector $$\mathbf{P}=(P_{1},\dots ,P_{m-1})^{T}$$satisfies the linear equation $$\mathbf{AP}=\mathbf{b}$$except for $$\mathrm{P}_{0} = \mathrm{P}_{0}^{*}$$and $$\mathrm{P}_{m} = \mathrm{P}_{n + 1}^{*}$$, where

$$\textstyle\begin{cases} \mathbf{A} = (a_{i,j})_{m - 1,m -1}, \\ \mathbf{b} = (b_{1},\ldots,b_{m - 1})^{T}, \\ a_{i,j} = \int _{ 0}^{ 1} b_{i,m}(\theta )b_{j,m}(\theta ) \,\mathrm{d}\theta ,\\ b_{j} = \int _{ 0}^{ 1} [ \sum_{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}(\theta ) ]b_{j,m}(\theta )\,\mathrm{d}\theta \\ \hphantom{b_{j} =}{}- \int _{ 0}^{ 1} ( \mathrm{P}_{0}^{*}b_{0,m}(\theta ) + \mathrm{P}_{n + 1}^{*}b_{m,m}(\theta ) )b_{j,m}(\theta )\,\mathrm{d}\theta , \end{cases}\displaystyle (i,j = 1,2,\ldots,m - 1).$$
(17)

### Proof

$$f^{*}(0) = f(0)$$ and $$f^{*}(1) = f(1)$$ are known from the continuity condition of $$C^{0}$$. Then

$$\mathrm{P}_{0} = \mathrm{P}_{0}^{*},\qquad \mathrm{P}_{m} = \mathrm{P}_{n + 1}^{*}.$$

According to Problem 2, there are

\begin{aligned} S =& d^{2}\bigl(\mathbf{r}^{*},\mathbf{r}\bigr) = \int _{ 0}^{ 1} \bigl[ \mathbf{r}^{*}(t) - \mathbf{r}(t) \bigr]^{2}\,\mathrm{d}t \\ =& \int _{ 0}^{ 1} \Biggl[\sum _{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}(t) - \sum_{j = 0}^{m} \mathrm{P}_{j}b_{j,m}(t) \Biggr]^{2} \,\mathrm{d}t. \end{aligned}

Let $$\partial S/\partial \mathrm{P}_{j} = 0$$, $$j = 1,2,\ldots,m - 1$$, the above equation can be reduced to

$$\begin{gathered}[b] \sum_{i = 1}^{m - 1} \mathrm{P}_{i} \int _{ 0}^{ 1} b_{i,m}(\theta )b_{j,m}(\theta )\,\mathrm{d}\theta \\ \quad = \int _{ 0}^{ 1} \Biggl[ \sum _{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}( \theta ) - \mathrm{P}_{0}^{*}b_{0,m}(\theta ) - \mathrm{P}_{n + 1}^{*}b_{m,m}(\theta ) \Biggr]b_{j,m}(\theta )\,\mathrm{d}\theta . \end{gathered}$$
(18)

In addition, Eq. (18) is expressed in a matrix form by calculation as follows:

$$\mathbf{AP} = \mathbf{b},$$
(19)

where

$$\textstyle\begin{cases} \mathbf{A} = (a_{i,j})_{m - 1,m - 1}, \\ \mathbf{b} = (b_{1},\ldots,b_{m - 1})^{T}, \\ a_{i,j} = \int _{ 0}^{ 1} b_{i,m}(\theta )b_{j,m}(\theta ) \,\mathrm{d}\theta ,\\ b_{j} = \int _{ 0}^{ 1} [ \sum_{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}(\theta ) ]b_{j,m}(\theta )\,\mathrm{d}\theta \\ \hphantom{b_{j} =}{}- \int _{ 0}^{ 1} ( \mathrm{P}_{0}^{*}b_{0,m}(\theta ) + \mathrm{P}_{n + 1}^{*}b_{m,m}(\theta ) )b_{j,m}(\theta )\,\mathrm{d}\theta , \end{cases}\displaystyle (i,j = 1,2,\ldots,m - 1).$$
(20)

Let $$\mathbf{e}_{j} = (a_{1,j},\ldots,a_{m - 1,j})^{T}$$$$(j = 1,2,\ldots,m - 1)$$, set

$$\sum_{j = 1}^{m - 1} c_{j} \mathbf{e}_{j} = c_{1} \begin{bmatrix} a_{1,1} \\ a_{2,1} \\ \vdots \\ a_{m - 1,1} \end{bmatrix} + c_{2} \begin{bmatrix} a_{1,2} \\ a_{2,2} \\ \vdots \\ a_{m - 1,2} \end{bmatrix} + \cdots + c_{m - 1} \begin{bmatrix} a_{1,m - 1} \\ a_{2,m - 1} \\ \vdots \\ a_{m - 1,m - 1} \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ \vdots \\ 0 \end{bmatrix},$$
(21)

that is,

$$\sum_{j = 1}^{m - 1} c_{j}a_{i,j} = \int _{ 0}^{ 1} \Biggl[ \sum _{j = 1}^{m - 1} c_{j}b_{j,m}( \theta ) \Biggr]b_{i,m}(\theta ) \,\mathrm{d}\theta = 0\quad (i = 1,2,\ldots,m - 1).$$
(22)

Since $$\{b_{1,m}(\theta ),\ldots ,b_{m-1,m}(\theta )\}$$ are linearly independent on $$\theta \in[0,1]$$, similar to Theorem 1, it is easy to prove that $$\{e_{1},\dots ,e_{m-1}\}$$ also satisfy the linear independence condition. Therefore, the solution of linear Eq. (18) exists and is unique, and thus is also the solution of Problem 2, and satisfies the $$C^{0}$$ continuity. □

### 4.3 Degree reduction of QB-curves by $$C^{1}$$ continuity conditions

To reduce the degree of the curves, if the $$C^{1}$$ continuity is required, that is, the first and last points of two curves have $$C^{1}$$ continuity interpolation, then there are

\begin{aligned}& \mathrm{P}_{0} = \mathrm{P}_{0}^{*},\qquad \mathrm{P}_{m} = \mathrm{P}_{n + 1}^{*}, \\& \mathrm{P}_{1} = \mathrm{P}_{0}^{*} + \frac{n + 1 + \lambda _{1}}{m + \lambda _{1}}\bigl(\mathrm{P}_{1}^{*} - \mathrm{P}_{0}^{*}\bigr),\qquad \mathrm{P}_{m - 1} = \mathrm{P}_{n + 1}^{*} - \frac{n + 1 + \lambda _{n + 1}}{m + \lambda _{n + 1}}\bigl( \mathrm{P}_{n + 1}^{*} - \mathrm{P}_{n}^{*} \bigr). \end{aligned}

The remaining $$m - 3$$ points are calculated according to Theorem 3.

### Theorem 3

If the coefficients $$\{ \mathrm{P}_{i}\}_{i = 0}^{m}$$are the solutions of Problem 2and keep $$C^{1}$$continuous, then vector $$\mathbf{P}=(P_{2},\ldots ,P_{m-2})^{T}$$satisfies the linear equation $$\mathbf{AP}=\mathbf{b}$$except for the following four endpoints:

$$\textstyle\begin{cases} \mathrm{P}_{0} = \mathrm{P}_{0}^{*}, \\ \mathrm{P}_{1} = \mathrm{P}_{0}^{*} + \frac{n + 1 + \lambda _{1}}{m + \lambda _{1}}(\mathrm{P}_{1}^{*} - \mathrm{P}_{0}^{*}), \\ \mathrm{P}_{m - 1} = \mathrm{P}_{n + 1}^{*} - \frac{n + 1 + \lambda _{n + 1}}{m + \lambda _{n + 1}}(\mathrm{P}_{n + 1}^{*} - \mathrm{P}_{n}^{*}), \\ \mathrm{P}_{m} = \mathrm{P}_{n + 1}^{*}, \end{cases}$$

where

$$\textstyle\begin{cases} \mathbf{A} = (a_{i - 1,j - 1})_{m - 3,m - 3}, \\ \mathbf{b} = (b_{1},\ldots,b_{m - 3})^{T}, \\ a_{i - 1,j - 1} = \int _{ 0}^{ 1} b_{i,m}(\theta )b_{j,m}(\theta ) \,\mathrm{d}t,\\ b_{j - 1} = \int _{ 0}^{ 1} [ \sum_{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}(\theta ) - \mathrm{P}_{0}b_{0,m}(\theta )\\ \hphantom{b_{j - 1} = }{} - \mathrm{P}_{1}b_{1,m}(\theta ) ]b_{j,m}(\theta )\,\mathrm{d}\theta \\ \hphantom{b_{j - 1} = }{}- \int _{ 0}^{ 1} ( \mathrm{P}_{m - 1}b_{m - 1,m}(\theta ) + \mathrm{P}_{m}b_{m,m}(\theta ) )b_{j,m}(\theta )\,\mathrm{d}\theta , \end{cases}\displaystyle (i,j = 2,\ldots,m - 2).$$
(23)

### Proof

According to the continuity conditions of $$C^{1}$$, we have

$$\textstyle\begin{cases} \mathbf{r}^{*}(0) = \mathbf{r}(0) , \\ \mathbf{r}^{*}(1) = \mathbf{r}(1), \end{cases}\displaystyle \quad \textstyle\begin{cases} \frac{\mathrm{d} [ \mathbf{r}^{*}(\theta ) ]}{\mathrm{d}\theta } \vert _{\theta = 0} = \frac{\mathrm{d} [ \mathbf{r}(\theta ) ]}{\mathrm{d}\theta } \vert _{\theta = 0} , \\ \frac{\mathrm{d} [ \mathbf{r}^{*}(\theta ) ]}{\mathrm{d}\theta } \vert _{\theta = 1} = \frac{\mathrm{d} [ \mathbf{r}(\theta ) ]}{\mathrm{d}\theta } \vert _{\theta = 1}. \end{cases}$$

Then

$$\textstyle\begin{cases} \mathrm{P}_{0} = \mathrm{P}_{0}^{*}, \\ \mathrm{P}_{1} = \mathrm{P}_{0}^{*} + \frac{n + 1 + 2\lambda }{m + 2\lambda } (\mathrm{P}_{1}^{*} - \mathrm{P}_{0}^{*}), \\ \mathrm{P}_{m - 1} = \mathrm{P}_{n + 1}^{*} - \frac{n + 1 + 2\lambda }{m + 2\lambda } (\mathrm{P}_{n + 1}^{*} - \mathrm{P}_{n}^{*}), \\ \mathrm{P}_{m} = \mathrm{P}_{n + 1}^{*}. \end{cases}$$

According to Problem 2, there are

\begin{aligned} S =& d^{2}\bigl(\mathbf{r}^{*},f\bigr) = \int _{ 0}^{ 1} \bigl[ \mathbf{r}^{*}( \theta ) - \mathbf{r}(\theta ) \bigr]^{2}\,\mathrm{d}\theta \\ =& \int _{ 0}^{ 1} \Biggl[\sum _{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}( \theta ) - \sum_{j = 0}^{m} \mathrm{P}_{j}b_{j,m}(\theta ) \Biggr]^{2} \,\mathrm{d}\theta . \end{aligned}
(24)

Let $$\partial S/\partial \mathrm{P}_{j} = 0$$, $$j = 2,\ldots,m - 2$$, the above equation can be reduced to

\begin{aligned}& \sum_{i = 2}^{m - 2} \mathrm{P}_{i} \int _{ 0}^{ 1} b_{i,m}(\theta )b_{j,m}(\theta )\,\mathrm{d}\theta \\& \quad = \int _{ 0}^{ 1} \Biggl[ \sum _{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}( \theta ) \Biggr]b_{j,m}(\theta )\,\mathrm{d}\theta \\& \qquad {}- \int _{ 0}^{ 1} \bigl( \mathrm{P}_{0}b_{0,m}( \theta ) + \mathrm{P}_{1}b_{1,m}(\theta ) + \mathrm{P}_{m - 1}b_{m - 1,m}(\theta ) + \mathrm{P}_{m}b_{m,m}( \theta ) \bigr)b_{j,m}(\theta )\,\mathrm{d}\theta . \end{aligned}
(25)

Further, Eq. (25) is expressed in a matrix form by calculation as follows:

$$\mathbf{AP} = \mathbf{b},$$
(26)

where

$$\textstyle\begin{cases} \mathbf{A} = (a_{i - 1,j - 1})_{m - 3,m - 3}, \\ \mathbf{b} = (b_{1},\ldots,b_{m - 3})^{T}, \\ a_{i - 1,j - 1} = \int _{ 0}^{ 1} b_{i,m}(\theta )b_{j,m}(\theta ) \,\mathrm{d}\theta , \\ b_{j - 1} = \int _{ 0}^{ 1} [ \sum_{i = 0}^{n + 1} \mathrm{P}_{i}^{*}b_{i,n + 1}(\theta ) - \mathrm{P}_{0}b_{0,m}(\theta )\\ \hphantom{b_{j - 1} = }{} - \mathrm{P}_{1}b_{1,m}(\theta ) ]b_{j,m}(\theta )\,\mathrm{d}\theta \\ \hphantom{b_{j - 1} = }{}- \int _{ 0}^{ 1} ( \mathrm{P}_{m - 1}b_{m - 1,m}(\theta ) + \mathrm{P}_{m}b_{m,m}(\theta ) )b_{j,m}(\theta )\,\mathrm{d}\theta \end{cases}\displaystyle (i,j = 2,\ldots,m - 2).$$
(27)

Let $$\mathbf{e}_{j} = (a_{1,j},\ldots,a_{m - 3,j})^{T}$$ ($$j = 1,2,\ldots,m - 3$$), set

$$\sum_{j = 1}^{m - 3} c_{j} \mathbf{e}_{j} = c_{1} \begin{bmatrix} a_{1,1} \\ a_{2,1} \\ \vdots \\ a_{m - 3,1} \end{bmatrix} + c_{2} \begin{bmatrix} a_{1,2} \\ a_{2,2} \\ \vdots \\ a_{m - 3,2} \end{bmatrix} + \cdots + c_{m - 3} \begin{bmatrix} a_{1,m - 3} \\ a_{2,m - 3} \\ \vdots \\ a_{m - 3,m - 3} \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ \vdots \\ 0 \end{bmatrix},$$
(28)

that is,

\begin{aligned}& \sum_{j = 1}^{m - 3} c_{j}a_{i,j} = \int _{ 0}^{ 1} \Biggl[ \sum _{j = 1}^{m - 3} c_{j}b_{j + 1,m}( \theta ) \Biggr]b_{i + 1,m}(\theta ) \,\mathrm{d}\theta = 0 \\& \quad (i = 1,2,\ldots,m - 3). \end{aligned}
(29)

Since $$\{b_{2,m}(\theta ),\ldots ,b_{m-2,m}(\theta )\}$$ are linearly independent on $$\theta \in[0,1]$$, similar to Theorem 1, it can be proved that $$\{e_{1},\ldots ,e_{m-3}\}$$ also satisfy the linear independence condition. Therefore, the solution of linear Eq. (25) exists and is unique, and thus is also the solution of Problem 2, and satisfies the $$C^{1}$$ continuity. □

## 5 Examples of degree reduction curves

In this paper, a wide numerical study has been carried out for the verification of correctness of the algorithm. The following is a numerical example of the application of the algorithm to QB-curves, in which the square distance formula

$$d^{2}\bigl(\mathrm{r}_{n + 1}^{*}(\theta ), \mathrm{r}_{m}(\theta )\bigr) = \int _{ 0}^{ 1} \bigl[\mathrm{r}_{n + 1}^{*}( \theta ) - \mathrm{r}_{m}(\theta )\bigr]^{2} \,\mathrm{d}\theta$$
(30)

is used to determine the error between the curves before and after reduction.

### Example 5.1

Given the shape parameters

$$\lambda _{1}^{*} = 1,\qquad \lambda _{2}^{*} = 1,\qquad \lambda _{3}^{*} = 2,\qquad \lambda _{4}^{*} = 0,\qquad \lambda _{5}^{*} = 0,\qquad \lambda _{6}^{*} = 0$$

and the control point coordinates

\begin{aligned}& \bigl\{ \mathrm{P}_{0}^{*} = ( - 5,0), \mathrm{P}_{1}^{*} = ( - 7,3) , \mathrm{P}_{2}^{*} = ( - 3,6) , \mathrm{P}_{3}^{*} = (2,7) ,\\ & \mathrm{P}_{4}^{*} = (6,6) , \mathrm{P}_{5}^{*} = (9,2.5) , \mathrm{P}_{6}^{*} = (7,0) \bigr\} \end{aligned}

to construct six QB-curves (blue solid lines) without constraints and under the constraint of $$C^{0}$$ and $$C^{1}$$, the curves are reduced to quartic QB-curves (red dashed lines). Here we give two different shape parameters to the reduced quartic QB curve. That is,

\begin{aligned}& \lambda _{1} = 1,\qquad \lambda _{2} = 1,\qquad \lambda _{3} = 2,\qquad \lambda _{4} = 0;\\ & \lambda _{1} = 1,\qquad \lambda _{2} = 2,\qquad \lambda _{3} = 2,\qquad \lambda _{4} = 0. \end{aligned}

The curves before and after reduction are shown in Fig. 1, and the control points and errors after reduction are shown in Tables 1 and 2, respectively.

### Example 5.2

Given the following shape parameters:

\begin{aligned}& \lambda _{1}^{*} = 1,\qquad \lambda _{2}^{*} = 0,\qquad \lambda _{3}^{*} = 0,\qquad \lambda _{4}^{*} = 1, \\& \lambda _{5}^{*} = 0,\qquad \lambda _{6}^{*} = 1,\qquad \lambda _{7}^{*} = 0,\qquad \lambda _{8}^{*} = 0 \end{aligned}

and the control point coordinates

\begin{aligned}& \bigl\{ \mathrm{P}_{0}^{*} = ( - 5,0), \mathrm{P}_{1}^{*} = ( - 8,3),\mathrm{P}_{2}^{*} = ( - 6.5,7),\\& \mathrm{P}_{3}^{*} = ( - 1,10), \mathrm{P}_{4}^{*} = (6,11), \mathrm{P}_{5}^{*} = (13,10),\\& \mathrm{P}_{6}^{*} = (18.5,7), \mathrm{P}_{7}^{*} = (20,3),\mathrm{P}_{8}^{*} = (17,0)\bigr\} \end{aligned}

to construct eight QB-curves (blue solid lines) without constraints and under the constraint of $$C^{0}$$ and $$C^{1}$$, the curve is reduced to quintic QB-curves (red dashed lines). Here we give two different shape parameters to the reduced quintic QB curve. That is,

\begin{aligned}& \lambda _{1} = 1,\qquad \lambda _{2} = 0,\qquad \lambda _{3} = 0,\qquad \lambda _{4} = 1,\qquad \lambda _{5} = 0;\\& \lambda _{1} = 1,\qquad \lambda _{2} = 0,\qquad \lambda _{3} = 0,\qquad \lambda _{4} = 0,\qquad \lambda _{5} = 0. \end{aligned}

The curves before and after reduction are shown in Fig. 2, and the control points and errors after reduction are shown in Tables 3 and 4, respectively.

### Example 5.3

Given the shape parameters

\begin{aligned}& \lambda _{1}^{*} = 1,\qquad \lambda _{2}^{*} = - 1,\qquad \lambda _{3}^{*} = 0,\qquad \lambda _{4}^{*} = 1,\qquad \lambda _{5}^{*} = 2,\\& \lambda _{6}^{*} = 1,\qquad \lambda _{7}^{*} = 1,\qquad \lambda _{8}^{*} = 1 \end{aligned}

and the control point coordinates

\begin{aligned}& \begin{gathered} \bigl\{ \mathrm{P}_{0}^{*} = ( - 5,0), \mathrm{P}_{1}^{*} = ( - 8,3),\mathrm{P}_{2}^{*} = ( - 6.5,7),\mathrm{P}_{3}^{*} = ( - 1,10), \mathrm{P}_{4}^{*} = (6,11), \mathrm{P}_{5}^{*} = (13,10),\\ \mathrm{P}_{6}^{*} = (18.5,7), \mathrm{P}_{7}^{*} = (20,3),\mathrm{P}_{8}^{*} = (17,0)\bigr\} \end{gathered} \end{aligned}

to construct eight QB-curves (blue solid lines) without constraints and under the constraint of $$C^{0}$$ and $$C^{1}$$, the curve is reduced to quartic QB-curves (red dashed lines). Here we give two different shape parameters to the reduced quartic QB curve. That is,

\begin{aligned}& \lambda _{1} = 1,\qquad \lambda _{2} = - 1,\qquad \lambda _{3} = 0,\qquad \lambda _{4} = 1;\\& \lambda _{1} = 1,\qquad \lambda _{2} = 0,\qquad \lambda _{3} = 0,\qquad \lambda _{4} = 1. \end{aligned}

The curves before and after reduction are shown in Fig. 3, and the control points and errors after reduction are shown in Tables 5 and 6, respectively.

## 6 Conclusions

In this paper, the least square degree reduction approximation problem for QB-curves based on $$L_{2}$$-norm without constrains and under the $$C^{0}$$ and $$C^{1}$$ constraints is studied. An algorithm for control points of approximating curves is also given. Three practical examples and their specific errors under three conditions reveal that the method achieves one-time reduction and multi-degree least square approximation of QB curve under various constraints. That is to say, this method is applicable for the system of CAD/CAM modeling. The degree reduction for QB surfaces will be studied in future work.

## References

1. Farin, G.: Curves and Surfaces for CAGD: A Practical Guide, 5th edn. pp. 227–238. Academic Press, San Diego (2002)

2. Abbas, M., Majid, A.A., Ali, J.M.: Monotonicity-preserving $$C^{2}$$ rational cubic spline for monotone data. Appl. Math. Comput. 219, 2885–2895 (2012)

3. Abbas, M., Majid, A.A., Awang, M.N.H., Ali, J.M.: Positivity-preserving $$C^{2}$$ rational cubic spline interpolation. ScienceAsia 39(2), 208–213 (2013)

4. Abbas, M., Ramli, N., Majid, A.A., Ali, J.M.: The representation of circular arc by using timmer rational cubic curve. Math. Probl. Eng. 2014, Article ID 408492 (2014)

5. Abbas, M., Majid, A.A., Ali, J.M.: Positivity-preserving rational bi-cubic spline interpolation for 3D positive data. Appl. Math. Comput. 234, 460–476 (2014)

6. Abbas, M., Majid, A.A., Awang, M.N.H., Ali, J.M.: Monotonicity preserving rational bi-cubic spline surface interpolation. Sci. Asia 40S, 22–30 (2014)

7. Abbas, M., Majid, A.A., Awang, M.N.H., Ali, J.M.: Convexity preserving rational bi-cubic spline surface interpolation. Sci. Asia 40S, 31–39 (2014)

8. Wan Jaafar, W.N., Mat Piah, A., Abbas, M.: Shape preserving visualization of monotone data using rational cubic ball function. Sci. Asia 40S, 40–46 (2014)

9. Mamar, E.: Shape preserving alternatives to the rational Bézier model. Comput. Aided Geom. Des. 18(1), 37–60 (2001)

10. Bashir, U., Abbas, M., Awang, M.N.H., Ali, J.M.: A class of quasi-quintic trigonometric Bezier curve with two shape parameters. Sci. Asia 39S(2), 11–15 (2013)

11. Bi Bi, S., Abbas, M., Misro, M.Y.: A novel approach of hybrid trigonometric Bézier curve to the modeling of symmetric revolutionary curves and symmetric rotation surfaces. IEEE Access 7(1), 165779–165792 (2019)

12. Usman, M., Abbas, M., Miura, K.T.: Some engineering applications of new trigonometric cubic Bezier-like curves to free-form complex curve modeling. J. Adv. Mech. Des. Syst. Manuf. 14(4), 19-00420 (2020)

13. Qinyu, C., Zhao, W.G.: A class of Bézier-like curves. Comput. Aided Geom. Des. 20(1), 29–39 (2003)

14. Oruc, H., Phillips, G.H.: q-Bézier Bernstein polynomials and Bézier curves. J. Comput. Appl. Math. 151(1), 1–12 (2003)

15. Han, X.: Cubic trigonometric polynomial curves with a shape parameter. Comput. Aided Geom. Des. 21(6), 535–548 (2004)

16. Zhang, J., Krause, F.L., Zhang, H.: Unifying C-curves and H-curves by extending the calculation to complex numbers. Comput. Aided Geom. Des. 22(9), 865–883 (2005)

17. Hu, G., Wu, J.L.: Generalized quartic H-Bézier curves: construction and application to developable surfaces. Adv. Eng. Softw. 138, 102723 (2019)

18. Hu, G., Wu, J.L., Qin, X.Q.: A novel extension of the Bézier model and its applications to surface modeling. Adv. Eng. Softw. 125, 27–54 (2018)

19. Hu, G., Bo, C.C., Wei, G., Qin, X.Q.: Shape-adjustable generalized Bézier surfaces: construction and its geometric continuity conditions. Appl. Math. Comput. 378, 125215 (2020)

20. Han, X., Ma, Y., Huang, X.: The cubic trigonometric Bézier curve with two shape parameters. Appl. Math. Lett. 22(3), 226–231 (2009)

21. Han, X., Huang, X., Ma, Y.: Shape analysis of cubic trigonometric Bézier curves with a shape parameter. Appl. Math. Comput. 217(6), 2527–2533 (2010)

22. Ait-Haddou, R., Sakane, Y., Nomura, T.: Gelfond-Bézier curves. Comput. Aided Geom. Des. 30(2), 199–225 (2013)

23. Qin, X., Hu, G., Yang, Y., et al.: Construction of PH splines based on H-Bézier curves. Appl. Math. Comput. 238(6), 460–467 (2014)

24. Farin, G.: Class a Bézier curves. Comput. Aided Geom. Des. 23(7), 573–581 (2006)

25. Han, X., Ma, Y., Huang, X.: A novel generalization of Bézier curve and surface. J. Comput. Appl. Math. 217(1), 180–193 (2008)

26. Yang, L., Zeng, X.: Bézier curves and surfaces with shape parameter. Int. J. Comput. Math. 86(7), 1253–1263 (2009)

27. Bashir, U., Abbas, M., Jamaludin, M.A.: The $$G^{2}$$ and $$C^{2}$$ rational quadratic trigonometric Bézier curve with two shape parameters with applications. Appl. Math. Comput. 219, 10183–10197 (2013)

28. Yan, L., Liang, J.: An extension of the Bézier model. Appl. Math. Comput. 218(6), 2863–2879 (2011)

29. Qin, X., Hu, G., Zhang, N., et al.: A novel extension to the polynomial basis functions describing Bézier curves and surfaces of degree n with multiple shape parameters. Appl. Math. Comput. 223(1), 1–16 (2013)

30. Hu, G., Bo, C., Qin, X.: Continuity conditions for QB-curves of degree n. J. Inequal. Appl. 2017, 115 (2017)

31. Hu, G., Bo, C., Qin, X.: Continuity conditions for tensor product Q-Bézier surfaces of degree ($$m,n$$). Comput. Appl. Math. 37(4), 4237–4258 (2018)

32. Rababah, A., Mann, S.: Iterative process for $$G^{2}$$-multi degree reduction of Bézier curves. Appl. Math. Comput. 217, 8126–8133 (2011)

33. Ahn, Y.J., Lee, B.-G., Park, Y., Yoo, J.: Constrained polynomial degree reduction in the $$L_{2}$$-norm equals best weighted Euclidean approximation of Bézier coefficients. Comput. Aided Geom. Des. 21(2), 181–191 (2004)

34. Cai, H., Wang, G.: Constrained approximation of rational Bézier curves based on a matrix expression of its end points continuity condition. Comput. Aided Des. 42(6), 495–504 (2010)

35. Lu, L., Wang, G.: Application of Chebyshev II-Bernstein basis transformations to degree reduction of Bézier curves. J. Comput. Appl. Math. 221(1), 52–65 (2008)

36. Rababah, A., Lee, B.G., Yoo, J.: A simple matrix form for degree reduction of Bézier curves using Chebyshev–Bernstein basis transformations. Appl. Math. Comput. 181(1), 310–318 (2006)

37. Liang, X., Zhang, C., Xu, L., et al.: Degree reduction of constrained Bézier curves using basic curves and modified curves under $$L_{\infty }$$ norm. J. Comput.-Aided Des. Comput. Graph. 18(1), 401–405 (2006)

38. Xu, S., Bai, B., Xiong, Y., et al.: Degree reduction of Bézier curves with asymmetric order parameter continuity at endpoints. J. Eng. Graph. 2008(5), 89–95 (2008)

39. Li, F., Hu, G., Abbas, M., Miura, K.T.: The generalized H-Bézier model: geometric continuity conditions and applications to curve and surface modeling. Mathematics 8, 924 (2020)

40. BiBi, S., Abbas, M., Miura, K.T., Misro, M.Y.: Geometric modeling of novel generalized hybrid trigonometric Bézier-like curve with shape parameters and its applications. Mathematics 8, 967 (2020)

41. Maqsood, S., Abbas, M., Hu, G., Lutfi Amri Ramli, A., Miura, K.T.: A novel generalization of trigonometric Bezier curve and surface with shape parameters and its applications. Math. Probl. Eng. 2020, Article ID 4036434 (2020)

### Acknowledgements

The authors would like to thank the anonymous referees for their careful reading of this manuscript and also for their constructive suggestions which considerably improved the article.

Not applicable.

## Funding

This work was supported by Universiti Sains Malaysia under Short Term Grant 304/PMATHS/6315223.

## Author information

Authors

### Contributions

All authors contributed equally to the writing of this paper. All authors read and approved the final manuscript.

### Corresponding authors

Correspondence to Muhammad Abbas or Md Yushalify Misro.

## Ethics declarations

### Competing interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

## Rights and permissions 