## 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 [19].

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 [1029]. In [25], 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 [30]. In [31], 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 [32]. 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 [37]. Xu et al. presented a method for degree reduction of a Bézier curve based on constrained Jacobi polynomials [38]. Li et al. [39] 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 [3941] 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 [25]

$\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.