Two Extensions of the Quadratic Nonuniform B-Spline Curve with Local Shape Parameter Series

Two extensions of the quadratic nonuniform B-spline curve with local shape parameter series, called theWDCP spline curve and theWDCP spline curve, are introduced in the paper. /e new extensions not only inherit most excellent properties of the quadratic nonuniform B-spline curve but also can move locally toward or against the fixed control polygon by varying the shape parameter series. /ey are C and C continuous separately. Furthermore, the WDCP spline curve includes the quadratic nonuniform B-spline curve as a special case. Two applications, the interpolation of the position and the corresponding tangent direction and the interpolation of a line segment, are discussed without solving a system of linear functions. Several numerical examples indicated that the new extensions are valid and can easily be applied.


Introduction
e nonuniform polynomial B-spline curve has been popularly applied in computer-aided geometric design (CAGD) [1]. In particular, the quadratic one, which is the simplest nonuniform B-spline curve, has gained widespread application based on its efficiency and convenience.
However, with the specified parameterization method of control point, the position of the classical B-spline curve is determined by the control polygon. e only way to adjust the shape of the curve is the modification of the control points, which can be seen as a shortcoming for shape adjusting in some cases. For example, in the shape designing, the control polygon as the outline curve is given firstly. en, the unique B-spline curve, which is smooth and approaches to the control polygon, can be obtained correspondingly. In fact, when the designer specifies the control polygon, he or she may already be satisfied with the rough shape of curves they wanted. Hence, the designer prefers to get more candidate curves characterized by the given control polygon which keeps the original rough shape. In other words, the curve should be modified tinily with the same control polygon.
To overcome the rigidity of the nonuniform polynomial B-spline curve, the nonuniform rational B-spline (NURBS) curve is developed by assigning a weight for each control point. erefore, the NURBS curve can be modified by altering the weights with fixed control polygon. However, in the light of the complexity of fractional expressions, it also suffers from several new drawbacks, such as difficulty in choosing the value of the weights, unstability with the increasing order of rational fraction, and trouble in derivatives and integrals computation. Furthermore, changing the weights to adjust the shape of a NURBS curve is hard to the designer [2].
In order to avoid the inconveniences of the NURBS curve, some new spline curves, the expressions of which include the shape parameters, have been extensively studied.
us, these new spline curves can be altered by the shape parameters effectively without changing the control polygon. In [3], the cubic β-spline curve with two global shape parameters was presented, which is C 2 continuous for a uniform knot sequence. e CB-spline curve or HB-spline curve constructed in the space spanned by polynomial and trigonometric/hyperbolic functions is another feasible method [4][5][6][7][8]. e definition domain can be seen as a global shape parameter. In [9], the variable degree polynomial spline curve with two degrees which play the role of design parameters was described. In [10], using a simple modification of the well-known geometric construction of C 4 quintic splines, a class of C 2 ∩FC 3 spline curves possessing tension properties is described. In [11,12], the shape parameters were given by blending the B-spline curves and a singularly parameterized sequence of connected line segments. In [13][14][15], with the help of the blending functions, the shape parameter series were incorporated into the usual spline basis functions, and consequently several kinds of the piecewise quartic polynomial spline curves with shape parameters were investigated under the uniform/nonuniform knot sequence. e main purpose of this paper is to increase the flexibility of the widely used quadratic nonuniform B-spline curve by imitating the way of [13][14][15]. Two kinds of nonuniform piecewise polynomial spline curve with local shape parameter series, called the W 3 D 3 C 1 P 2 spline curve and the W 3 D 4 C 2 P 1 spline curve, are introduced in the present paper. ey are considered as the extensions of the quadratic nonuniform B-spline curve, because of the following: (i) ey have three consecutive control points for each curve segment, which means that they have the same structure of the expression as the quadratic Bspline curve (ii) ey inherit the most excellent geometric properties of the quadratic B-spline curve, such as the properties of geometric invariance, affine invariance, local support, convex hull, variation diminishing (VD), as well as C 1 /C 2 continuity (iii) ey include the quadratic nonuniform B-spline curve as a special case for the W 3 D 3 C 1 P 2 spline curve (iv) ey can be adjusted locally by varying the values of shape parameters with the fixed control polygon, which exceed the quadratic nonuniform B-spline curve When the shape parameter is global, the change of a shape parameter value affects the entire curve leading to a global change, which is not so suitable for CAGD applications. In view of this, the shape parameters in the present paper are local. Varying a shape parameter value only allows modifying the shape of the curve locally in two neighboring curve segment. In addition, these two extensions can be closer to or more far away from the given control polygon than the quadratic B-spline curves with appropriate shape parameters. e rest of this paper is organized as follows. In Section 2, two kinds of basis functions with local shape parameter series are described and the properties of them are analyzed in detail. e corresponding spline curves are constructed, and the local control of them is shown in Section 3. Open and closed spline curves are illustrated. Section 4 deals with two interpolations without solving a system of linear functions, the interpolation of the position and the corresponding tangent direction, and the interpolation of a line segment. e problems with the clamped knot vector are discussed in Section 5. Conclusion is given in Section 6. Our results are supported by numerical examples in Section 2, Section 3, Section 4, and Section 5.

Basis Functions
2.1. Definition. Given a nonuniform knot sequence u i +∞ i�−∞ , let · · · < u 0 < u 1 < · · · < u n−1 < u n < · · ·, where we refer to U � (. . . , u 0 , u 1 , . . . , u n−1 , u n , . . .) as a knot vector. e piecewise linear transformation function t(u) can transform the point in the interval [u i , u i+1 ) to the one in the unit interval [0, 1) as follows: (1) With the help of the linear transformation function t(u), two kinds of piecewise polynomial basis functions with local shape parameter series are defined as follows.
Definition 1. Given a knot vector U, the W 3 D 3 C 1 P 2 basis functions N I,i (u) +∞ i�−∞ with two local shape parameter series α i +∞ i�−∞ and β i +∞ i�−∞ and the W 3 D 4 C 2 P 1 basis functions N II,i (u) +∞ i�−∞ with one local shape parameter series c i +∞ i�−∞ are defined to be the following functions: where 2 Mathematical Problems in Engineering e implication of the acronym W i D j C k P l is shown in Table 1. More details of the properties mentioned in Table 1 can be seen in Section 2.2.

Properties.
If the control polygon is maintained, the properties of the spline curve depend on its basis functions. To analyze the spline curve in Section 3, we list the properties of the W 3 D 3 C 1 P 2 and the W 3 D 4 C 2 P 1 basis functions N e,i (u) +∞ i�−∞ (e � I, II) as follows, all of which can be proved from a direct calculation.
Property 1 (local support). For u ∈ [u i , u i+1 ), the basis functions N e,i (u) +∞ i�−∞ (e � I, II) are zero, which means that the width of the support intervals is three.

Mathematical Problems in Engineering
We illustrate the basis functions N e,i (u) +∞ i�−∞ (e � I, II) in Figure 1. (1), we have assumed that each point is simple. We discuss the multiple knots with multiplicity k (k � 2, 3) in this section. e construction of basis functions with multiple knots is analogous to Definition (2). e only difference between them is that we delete the corresponding pieces if the knot is multiple. For example, when u i 0 � u i 0 +1 is a double knot (here, we set d i 0 −1 � 0 to make sense of the corresponding definition), we define the basis functions N e,i 0 −1 (u)(e � I, II) as follows:

e Case of Multiple Knots. So far, in Definition
where we delete the piece on [u i 0 , u i 0 +1 ).
According to the definition above, the support intervals width of the basis functions is reduced from 3 segments to 3 − k.
Property 7 (continuity at double knots). Suppose that u i 0 � u i 0 +1 in the knot sequence, the basis functions .
e basis functions with double knots are still nonnegative although the values of the local shape parameters do not satisfy inequalities in (4) and (6). We take N I,i 0 −1 (u) in (9), for example: Considering We display the basis functions N e,i (u)

Spline Curve
3.1. Definition. Given a set of control points P i n i�1 and a nonuniform knot sequence u i +∞ i�−∞ , two kinds of nonuniform piecewise polynomial spline curves with local shape parameter series are defined as follows.
Definition 2. Given a set of control points P i n i�1 and a nonuniform knot sequence u i n+3 i�1 , the W 3 D 3 C 1 P 2 spline curve, the W 3 D 4 C 2 P 1 spline curve P e (u)(e � I, II), and the corresponding ith (3 ≤ i ≤ n) curve segment is defined as follows: I, II),

3.2.
Properties. e properties of the W 3 D 3 C 1 P 2 spline curve P I (u) and the W 3 D 4 C 2 P 1 spline curve P II (u) are already shown in this section.
Property 9 (local shape adjustability). When the ith shape parameter is varying, such as α i , β i , or c i , only two curve segments P e,i (u) and P e,i+1 (u) in P e (u)(e � I, II) will be changed.
Proof. Here, we take α i in P I,i (u) as example. Based on the definition of P I,i (u) in (9), the matrix form of the curve segment P I,i (u) is written as follows: Hence, the curve segment P I,i (u) can be adjusted by varying the value of α i−1 and α i . And, we also can obtain that P I,i+1 (u) can be adjusted by varying the value of α i and α i+1 .
at is to say, only P I,i (u) and P I,i+1 (u) will modify when α i changes.
e rest of Property 9 can be proved similarly.
□ Property 10 (geometric invariance). e spline curves P e (u)(e � I, II) only rely on the control points, whereas they are unrelated to the coordinate system.  Property 13 (continuity). e W 3 D 3 C 1 P 2 spline curve P I (u) is C 1 continuous, and the W 3 D 4 C 2 P 1 spline curve P II (u) is C 2 continuous.

Remark 2.
e curvature of W 3 D 4 C 2 P 1 spline curve is continuous based on its C 2 continuity. We take the W 3 D 4 C 2 P 1 spline curves in Figure 5(b), for example.
It is obvious that different shape parameter series bring different curvature distributions in Figure 6. How to get the most stable curvature? at is a challenge in our future work.
, the W 3 D 3 C 1 P 2 spline curve P I (u) degenerates into the quadratic nonuniform B-spline curve.
Proof. According to the matrix form of the curve segment (12), P I,i (u) is the cubic Bézier curve with control points Q i j 3 j�0 as follows: We take Q i 0 , for example: us, Q i 0 is the linear combination of P i−2 and P i−1 and lies on the line segment P i−2 P i−1 . Q i 1 , Q i 2 , and Q i 3 are similar to Q i 0 . When inequality (13) holds, the order of these points is Figure 7). Meanwhile, if the control polygon P i−2 P i−1 P i is monotone or convex, the control polygon Q i 0 Q i 1 Q i 2 Q i 3 is also monotone or convex. So, the curve segment P I,i (u) considered as a cubic Bézier curve is monotone or convex, too. e shape-preserving property of the W 3 D 3 C 1 P 2 spline curve P I (u) can be obtained thus. Similarly, the rest of Property 15 about the W 3 D 4 C 2 P 1 spline curve P II (u) also can be proved.

□
Property 16 (variation diminishing property). e W 3 D 3 C 1 P 2 spline curve P I (u) is variation diminishing if (13) holds; the W 3 D 4 C 2 P 1 spline curve P II (u) is variation diminishing if (14) holds.
Proof. It is a direct application of the Bézier representation of P e,i (u)(e � I, II).

Remark 3.
e properties of shape-preserving and variation diminishing are very important for the spline curve. erefore, when we construct the W 3 D 3 C 1 P 2 spline curve and the W 3 D 4 C 2 P 1 spline curve, we choose the shape parameter series based on not only (4) and (6) but also (13) and (14). Figure 7: e Bézier representation of the curve segment P I,i (u).

Geometric Effect of the Shape Parameters.
From Property 9, we can adjust the W 3 D 3 C 1 P 2 spline curve segment P I,i (u) by altering the value of α i−1 , α i , β i−1 , and β i and adjust the W 3 D 4 C 2 P 1 spline curve segment P II,i (u) by altering the value of c i−1 and c i . We present the effect of the shape parameters in the shape modification by the derivatives as follows: (19) ese 6 derivatives are similar; hence, we take (17) as example to explain the geometric effect of the shape parameters α i with respect to the curve segment P I,i (u). When we increase α i only while fixing α i−1 , β i−1 , β i , the curve segment P I,i (u) will be away from P i−1 and closed to P i . Figure 8 shows the geometric effect of α i , β i , and c i from (17)-(19).
Based on the shape parameters, the two extensions are more flexible than the quadratic B-spline curve. We show that the W 3 D 3 C 1 P 2 spline curve and the W 3 D 4 C 2 P 1 spline curve can be closer to or more far away from the given control polygon than the quadratic B-spline curves with appropriate shape parameters in Figure 9.

4.1.
e Geometric Significance of the Shape Parameter. Before we apply the two extensions of the quadratic nonuniform B-spline curve to interpolation, we present the position and the corresponding tangent direction of them at u � u i+1 . It follows from a routine computation that Consequently, the point P e (u i+1 )(e � I, II) lies on the line segment P i−1 P i , and the tangent direction at P e (u i+1 )(e � I, II) is parallel to P i−1 P i from (20) and (21). Furthermore, we can obtain the geometric significance of the shape parameter as follows:  Figure 9 show it intuitively. Based on the geometric significance of the shape parameters (20) and (21), two interpolations are presented as follows.

Interpolation of the Position and Tangent Direction.
Given a set of points Q i n i�1 and the unit direct vectors T i n i�1 on them as the tangent directions, we can construct a W 3 D 3 C 1 P 2 spline curve P I (u) (u ∈ [u 3 , u n+1 ]) from "IPT (Interpolation of the Position and Tangent direction) algorithm," without solving a system of linear functions such that

IPT Algorithm
Step 1. We construct the control polygon P 1 P 2 , . . . , P n P n+1 first, such that Q i lies on the line segment P i P i+1 and T i � � � �P i P i+1 .
Step 2. We set the local shape parameter series α i n+1 i�2 from (22) as 8 Mathematical Problems in Engineering Step 3. We select the arbitrary local shape parameter series β i n+1 i�2 from the scopes in (4) and (13) based on α i n+1 i�2 above.

Remark 3.
We can set the first control point P 1 and the last control point P n+1 as follows: e corresponding shape parameters α 2 � α n+1 � 0.5.  Figure 9: e two extensions can be closer to or more far away from the control polygon than the B-spline curves: (a) the W 3 D 3 C 1 P 2 spline curve segment P I,i (u); (b) the W 3 D 4 C 2 P 1 spline curve segment P II,i (u).
Comparing (24) with (22), we can see that the W 3 D 3 C 1 P 2 spline curve P I (u) from the "IPT algorithm" interpolates both the position Q i n i�1 and the corresponding tangent direction T i n i�1 with local shape parameter series β i n+1 i�2 ( Figure 10).
Unfortunately, the W 3 D 3 C 1 P 2 spline curve P II (u) is not suitable to interpolate the position and tangent direction. When we set the local shape parameter series c i +∞ i�−∞ based on (22) like (24), the value of shape parameter c i may be against the scope in (6), which keeps the nonnegativity of the basis function N II,i (u) +∞ i�−∞ .

Interpolation of a Line Segment.
Given a line segment AB, we can construct a W 3 D 3 C 1 P 2 spline curve P I (u) as follows, such that the curve segment P I,i (u)(u ∈ [u i , u i+1 ]) is the line segment AB.
We set P i−2 , A, P i−1 , B, and P i as collinear. A is between P i−2 and P i−1 , and B is between P i−1 and P i ( Figure 11). en, we set the corresponding shape parameter from (18) as follows: Hence, (26) gives P I,i u i � A, In view of the convex hull property, the curve segment P I,i (u) is in the convex hull of P j i j�i−2 , which is a line segment itself. e local shape parameter series β i n+1 i�2 can be selected freely from the scopes in (4) and (13). Hence, the curve segment P I,i (u) is the line segment AB. Note that the whole spline curve P I (u) is still C 1 continuous.
Similarly, we can get a W 3 D 4 C 2 P 1 spline curve P II (u) in which the curve segment P II,i (u)(u ∈ [u i , u i+1 ]) is the line segment AB, too. Note that the whole spline curve P II (u) is still C 2 continuous. From (22), the corresponding shape parameters are set as follows: Compared with P I (u), the corresponding shape parameters in P II (u) are fixed.

Problems with Clamped Knot Vector
In the B-spline model, clamped knot vector U � (u 3 , u 3 , u 3 , u 4 , · · · , u n , u n+1 , u n+1 , u n+1 ) can be used to interpolate the first control point P 1 and the last control point P n . e corresponding tangent direction at P 1 or P n is parallel to P 1 P 2 or P n−1 P n , respectively. Clamped knot vector is also suitable for the new basis functions constructed in Section 2.3.
With a clamped knot vector U, we can set α 1 � α n+1 � 1 and α 2 � α n+2 � 0 for the W 3 D 3 C 1 P 2 spline curve P I (u) as Property 7, and we have P I u 3 � P 1 , P I u n � P n , In Figure 12(a), with a clamped knot vector, we can see that P I (u) interpolates the first control point P 1 and the last control point P n , and the tangential directs at P 1 is parallel to P 1 P 2 . However, the tangent direction at P n is not parallel to P n−1 P n based on (29). In order to make the tangent direction at P n is parallel to P n−1 P n , we can construct P I (u) as follows: Step 1. Unclamp the right end of the knot vector U as U � (u 3 , u 3 , u 3 , u 4 , . . . , u n , u n+1 , u n+2 , u n+3 ).
Step 2. Choose the auxiliary end control point P n on the extension line of P n−1 P n , which takes the place of P n .
Step 3. Set the shape parameter α n+1 � ‖P n−1 P n ‖/‖P n−1 P n ‖ from (18). Hence, we have P I (u n ) � P n and P I ′ (u − n ) � � � � � P n−1 P n from (20) (Figure 12(b)). P II (u) with a clamped knot vector also interpolates the first and the last control point, and the tangential direction at P n is parallel to P n−1 P n (Figure 13(a)). However, the tangent direction at P 1 is not parallel to P 1 P 2 . e corresponding construction of P II (u) is similar to the case of P I (u) (Figure 13(b)). Mathematical Problems in Engineering Figure 11: Interpolation of a line segment: (a) the W 3 D 3 C 1 P 2 spline curve P I (u); (b) the W 3 D 4 C 2 P 1 spline curve P II (u).  Figure 13: e improvement of the W 3 D 4 C 2 P 1 spline curve (P) II (u): (a) knot vector (0, 0, 0, 1, 1, 1); (b) knot vector (−2, −1, 0, 1, 2, 3) and control polygon P 1 P 2 P 3 .

Conclusion
Two extensions of the quadratic nonuniform B-spline curve, called the W 3 D 3 C 1 P 2 spline curve and the W 3 D 4 C 2 P 1 spline curve, are constructed in the paper. Both of the extensions have the same structure as the quadratic nonuniform Bspline curve. e properties of the extensions are similar with the ones of the quadratic nonuniform B-spline curves (Table 2). Particularly, the quadratic nonuniform B-spline curve is the special case of the W 3 D 3 C 1 P 2 spline curve when taking specified shape parameter series. e shapes of the extensions can be adjusted by the shape parameter series locally even the control points fixed. e effects of varying the shape parameters on the extensions are illustrated. With the shape parameters, the extensions can move locally toward or against the control polygon. Based on the properties of the extensions, two applications, the interpolation of the position and tangent direction and interpolation of a line segment, are presented without solving a system of linear functions. However, the extensions can not deal with the clamped knot vector very well. e tangent directions at the ends of control points are not parallel to the ends of control polygon. Although we construct the spline curve with the auxiliary points to avoid the defect, we will improve the basis functions in the case of multiple knots in our future research.

Data Availability
e data used to support the findings of this study are included within the article and are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.