mathematics

Article Geometric Modeling Using New Cubic Trigonometric B- Functions with Shape Parameter

Abdul Majeed 1 , Muhammad Abbas 2,* , Faiza Qayyum 1, Kenjiro T. Miura 3 , Md Yushalify Misro 4,* and Tahir Nazir 2

1 Department of Mathematics, Division of Science and Technology, University of Education, Lahore 54770, Pakistan; [email protected] (A.M.); [email protected] (F.Q.) 2 Department of Mathematics, University of Sargodha, Sargodha 40100, Pakistan; [email protected] 3 Department of Mechanical Engineering, Shizuoka University, Hamamatsu, Shizuoka 432-8011, Japan; [email protected] 4 School of Mathematical Sciences, Universiti Sains Malaysia, Penang 11800, Malaysia * Correspondence: [email protected] (M.A.); [email protected] (M.Y.M.)

 Received: 5 September 2020; Accepted: 19 October 2020; Published: 24 November 2020 

Abstract: Trigonometric B-spline curves with shape parameters are equally important and useful for modeling in Computer-Aided Geometric Design (CAGD) like classical B-spline curves. This paper introduces the cubic and rational cubic B-spline curves using new cubic basis functions with shape parameter ξ ∈ [0, 4]. All geometric characteristics of the proposed Trigonometric B-spline curves are similar to the classical B-spline, but the shape-adjustable is additional quality that the classical B-spline curves does not hold. The properties of these bases are similar to classical B-spline basis and have been delineated. Furthermore, uniform and non-uniform rational B-spline basis are also presented. C3 and C5 continuities for trigonometric B-spline basis and C3 continuities for rational basis are derived. In order to legitimize our proposed scheme for both basis, floating and periodic curves are constructed. 2D and 3D models are also constructed using proposed curves.

Keywords: cubic trigonometric b-spline functions; cubic curves and its properties; C3 and C5 continuity; geometric modeling

1. Introduction Splines are a kind of curve, initially evolved in the days prior to computer modeling. Geometric modeling refers to a set of techniques concerned mainly with developing efficient representations of geometric aspects of design. Therefore, geometric modeling is a fundamental part of all CAD (computer-aided design) tools. The basic geometric modeling approaches available to designers on the CAD system are: (1) Wireframe modeling, (2) curve modeling, (3) surface modeling, and (4) solid modeling. In curve modeling, we deal with trigonometric Bézier-like [1–5], Q-Bézier [6], H-Bézier [7], Ball Bézier-like [8], S-λ Bézier-like [9], classical Bézier, B-spline, and NURBS curve, etc. Schoenberg introduced the trigonometric spline , spline interpolation of higher derivatives, interpolating spline as limit of , and Spline interpolation and best quadrature formulae in [10–13]. Lyche and Winther [14] proved a stable recurrence relation for trigonometric B-splines. Walz [15] constructed some identities for trigonometric B-splines with an application to curve design. The term B-spline (Basis spline) introduced is in [16–18]. The curves swarmed the area of Computer Aided Geometric Design (CAGD) in the middle of 1980s. In CAGD, trigonometric polynomials have also procured the great attention for 2D and 3D modeling, for example [19] proposed Cn continuous trigonometric spline curves for data interpolation. The trigonometric Bézier-like curve with shape

Mathematics 2020, 8, 2102; doi:10.3390/math8122102 www.mdpi.com/journal/mathematics Mathematics 2020, 8, 2102 2 of 25 parameters based on new trigonometric basis function is proposed by [20]. Majeed and Faiza [21] proposed the curves and bases based on trigonometric B-spline for geometric modeling. The quadratic trigonometric polynomial curve with C1 continuity is introduced by [22]. It holds the basic properties of classical B-spline curves. Han [23] added cubic trigonometric B-spline curves on uniform and non-uniform knots with shape parameters to the literature. The application of the B-spline curve in Bio-modeling is given in [24]. Chouby and Ojha [25] introduced the quadratic spline curve with variable shape parameters. Pagani and Scott [26] proposed the sampling method for the reconstruction of curves and surfaces. Surface reconstruction by parallel curves is proposed by [27] with the application of fracture reconstruction. Hu et al. [28] proposed a scheme based on λµ-B-spline for the construction of rotational surface. Rational Bézier curves is proposed by [29] for the construction of frontal bone fracture. Yan and Liang [30] proposed algebraic-trigonometric blended spline curve (xyB curves). In the proposed curve, x and y are shape parameters to control the curve. Troll [31] proposed cubic trigonometric Bézier curves. A generation of convex polygon triangulation based on planted trivalent binary tree and ballot notation was proposed by [32]. SARACEVIC and SELIM˙ I[˙ 33] proposed the method for Catalan number decomposition in the expressions of the form (2 + ı). The authors in [34] have discussed the geometric effect of shape parameter introduced in [22,23]. The trigonometric cubic Bézier curve is proposed by [35] with shape parameters. Gang and Guo-Zhao [36] introduced interpolating α-B-spline build on the new B-splines possessing global and local shape parameters. This paper presents new trigonometric cubic B-spline basis functions acquiring shape parameter ξ. The proposed basis and curves satisfy the basic properties and are C5 continuous. Rational basis functions and curves are also derived at uniform and non-uniform knots. C3 continuous rational curves are also derived in this paper. Validity and applicability of the proposed curves are checked by modeling the floating and periodic curves. In the end, the proposed curves are also used for 2D and 3D modeling. The objectives of the proposed research are:

1. To derive new trigonometric B-spline basis functions with shape parameter ξ; 2. To derive trigonometric rational B-spline and NURBS curves; 3. To derive different continuities for basis and curve on uniform and non-uniform knots; 4. To apply the derived curves for 2D and 3D modeling.

The rest of the paper is organized as follow. In Section2, trigonometric B-spine bases have been constructed. Section3, presents the modeling of cubic trigonometric B-spline curves with its application. Section4 explains the construction of rational trigonometric B-spline and NURBS bases. The construction of rational trigonometric B-spline curves and geometric modeling with concluding remarks is explained in Section5.

2. The Construction of Trigonometric B-Spline Basis The proposed trigonometric cubic B-spline with ξ ∈ [0, 4] as shape parameter on knot vector N (n0 < n1 < n2 < ... < ni+4) is defined as:   aj(l3(tj)) n ∈ [nj, nj+1),   3  ∑ cj+1,k(lk)(tj+1) n ∈ [nj+1, nj+2),  k=0  3 Fj(n) = ∑k=0 bj+2,k(lk)(tj+2) n ∈ [nj+2, nj+3), (1)    dj+3(l0(tj+3)) n ∈ [nj+3, nj+4),    0 otherwise.

π n−nj Here, t (n) = ( ) and j ∈ [0, 4]. For uniform knots q = q − = q − . The functions used j 2 nj+1−nj j j 1 j 2 in Equation (1) are: Mathematics 2020, 8, 2102 3 of 25

3 2α − β − q j 1 j 2 j 2 aj = , bj,0 = [1 − (ξ − 3ξ − 1)dj+1]γj+1(qj−1 − qj), ψj−2 2 3γj+1qj−1αj bj,1 = , 2φj−3 (1 − 2ξ)βj−1qj−1bj,0 bj,2 = , φj+1 bj,3 = 4ξ[qj+1 − qj]γj, αj+2qj (2) dj = , 2βj+1ψj+2 cj,3 = −3βj−1(qj+2 − qj−1)[γj+2qj+1 + αj+1qj]aj+2, 4φj−1 cj,2 = , 3γj+1qj+1 3 12γjαj+1q ψj−1cj,0 = j cj,1 2 , φj+1 cj,0 = (qj+2 − qj+1)αj+1dj−1, where: 1 1 q = n + − n , α = , β = j j 1 j j qj+1+qj j qj−1+qj−2 ψ (q +1) γ = 2 , φ = j−2 j+1 , (3) j q − +q +q + j ( 3 + 2 ) j 1 j j 1 2 βj−1qj−1 αjqj+1 2 2 2 ψj = 6ξ αj−1qj−1 − 3ξqj + 10βj+1qj+1. The proposed cubic trigonometric B-spline functions possessing ξ are defined as:

2 2 l0(t) = (1 − sint) (ξ − ξ + 1 − sint), 2 2 l1(t) = (1 + cost) (ξ − ξ + 1 + cost), 2 2 (4) l2(t) = (1 + sint) (ξ − ξ + 1 + sint), 2 2 l3(t) = (1 − cost) (ξ − ξ + 1 − cost).

The basis functions can be defined on n ∈ [nj, nj+1) by replacing j by j − 3, j − 2, j − 1, j in Equation (1). The basis of the functions are:

F0(n) = dj(l0(tj)), 3 F1(n) = ∑k=0 bj,k(lk)(tj), 3 (5) F2(n) = ∑k=0 cj,k(lk)(tj), F3(n) = aj(l3(tj)).

Figure1 represents the graphical behavior of spline functions, where the effect of shape parameter ξ is represented in Figure2.

1

0.9

0.8

0.7

0.6 (n)

j 0.5 F

0.4

0.3

0.2

0.1

0 0 1 2 3 4 5 6 7 8 n

Figure 1. Graphical behavior of the proposed trigonometric functions. Mathematics 2020, 8, 2102 4 of 25

1

0.9 ξ=0.5

0.8 ξ=2 ξ=4 0.7

0.6 (n)

j 0.5 F

0.4

0.3

0.2

0.1

0 0 1 2 3 4 5 6 7 8 n

Figure 2. The effect of shape parameter ξ.

Properties of the Cubic Trigonometric Spline Functions The following properties are satisfied by the proposed basis.

Theorem 1. The proposed cubic trigonometric B-spline basis function satisfy the partition of unity property:

3 ∑ Fj(n) = 1. j=0

Proof of Theorem1. See AppendixA

Theorem 2. The cubic trigonometric B-spline basis holds non-negativity property i.e., Fj(n) > 0.

Proof of Theorem2. See AppendixB

Theorem 3. The derived basis are C3 and C5 continuous for non-uniform knots.

Proof of Theorem3. See AppendixC

3. Modeling of Cubic Trigonometric B-Spline Curves

2 Definition 1. Let Fj(n) be the basis functions defined in Equation (5) above and Sj ∈ R for j = [0, 3] are control points in plane. The cubic trigonometric B-spline curve is defined as:

3 G(n) = ∑ Fj(n)Sj, (6) j=0 where, F0(n) = dj(l0(tj)), 3 F1(n) = ∑k=0 bj,k(lk)(tj), 3 F2(n) = ∑k=0 cj,k(lk)(tj), F3(n) = aj(l3(tj)). and π n − nj tj(n) = ( ). 2 nj+1 − nj Mathematics 2020, 8, 2102 5 of 25

3.1. Properties of Cubic Trigonometric B-Spline Curves The following properties are obeyed by proposed curves.

3.1.1. Convex Hull Property The constructed curves always lies within the convex hull of the control polygon as shown in Figure3.

8

7

6

5

4

3

2

1

0 -1 0 1 2 3 4 5 6 7 8

Figure 3. Convex hull property.

3.1.2. Affine Transformation The transformation may be of rotation, scaling, reflection, and translation. Let L be the transformation then: n n L(∑ SjFj(n)) = ∑ L(Sj)Fj(n). j=0 j=0

Theorem 4. The proposed curve possesses C3 and C5 continuity for ξ 6= 1. For multiple knots, the curve has C3−k continuity here k = [0, 3].

Proof of Theorem4. See AppendixD

3.2. Floating and Periodic Curves Using Proposed Trigonometric Basis Functions

3.2.1. Floating Cubic B-Spline Curve The cubic trigonometric basis are used to construct the floating curves with ξ = 4 and 1 as shown in Figure4.

16

15

14

13

12

11

10

9

8

7

6

5

2 4 6 8 10 12 14 16

Figure 4. Floating curve using ξ = 4 (magenta) and ξ = 1 (black) color curve. Mathematics 2020, 8, 2102 6 of 25

3.2.2. Periodic Trigonometric B-Spline Curves Periodic curve is drawn using cubic trigonometric B-spline basis functions as shown in Figure5. Periodic curves can be drawn in blue, red, and magenta colors with ξ = 0, 2, and 4 respectively these shape parameters provide more flexibility than classical B-spline curves.

5

4

3

2

1

0

-1

-2

-3

-4

-5 -6 -4 -2 0 2 4 6

Figure 5. Periodic curve with ξ = 0 (Blue), ξ = 2 (Red), and ξ = 4 (Magenta).

From Figures4 and5, it is observed that the proposed cubic trigonometric B-spline curves work well for both floating and periodic curves. It is also observed that shape parameter ξ has a significant effect on the curve.

4. Rational Trigonometric B-Spline and NURBS Definition 2. Rational trigonometric B-spline and NURBS are a generalization of B-spline basis. It enhances the flexibility of the curve. It is generally expressed as:

n ∑j=0(wjFj,d(n)) Y(n) = n . ∑j=0(wjFj,d(n))

Here d is the degree of trigonometric B-spline basis. wjs are positive weights. Fj,d(n) are the trigonometric B-spline basis. Simply, we can write it as:

n Y(n) = ∑ Qj,d(n), j=0 where, (wjFj,d(n)) Qj,d(n) = n . ∑j=0(wjFj,d(n)) The expression for the rational trigonometric B-spline and NURBS becomes:

3 ∑ = (wjFj(n)) ( ) = j 0 Y n 3 , ∑j=0(wjFj(n)) Mathematics 2020, 8, 2102 7 of 25 or 3 Y(n) = ∑ Qj(n), j=0 where (w F (n)) ( ) = j j Qj n 3 . ∑j=0(wjFj(n))

Remark 1. In the above equations if B-spline basis Fj(n) are defined over uniform knots then the basis becomes Rational trigonometric B-spline otherwise NURBS.

Properties of the Rational Trigonometric B-Spline and NURBS The proposed rational trigonometric B-spline and NURBS basis possess the following properties.

Theorem 5. For all wj = 1, then Qj(n) = Fj(n).

Proof of Theorem5. We prove this by taking:

w F (n) ( ) = j j Qj n 3 . ∑j=0(wjFj(n))

Put, wj = 1 then above equation becomes:

Fj(n) Qj(n) = . (F0(n) + F1(n) + F2(n) + F3(n))

Here F0(n), F1(n), F2(n), F3(n), are defined in Equation (5). Since, we have proved earlier that:

3 ∑ Fj(n) = 1. j=0

Thus, we get: Qj(n) = (Fj(n)).

Theorem 6. The rational cubic trigonometric B-spline basis function satisfies the partition of unity property i.e.

3 Y(n) = ∑ Qj(n) = 1. j=0

Proof of Theorem6. Since, (w F (n)) ( ) = j j Qj n 3 , ∑j=0(wjFj(n)) or simply: (wjFj(n)) Qj(n) = . w0F0(n) + w1F1(n) + w2F2(n) + w3F3(n) Now,

3 Y(n) = ∑ Qj(n), j=0 Mathematics 2020, 8, 2102 8 of 25

Y(n) = Q0(n) + Q1(n) + Q2(n) + Q3(n).

w F (n) Y(n) = 0 0 (7) w0F0(n) + w1F1(n) + w2F2(n) + w3F3(n) w F (n) + 1 1 w0F0(n) + w1F1(n) + w2F2(n) + w3F3(n) w F (n) + 2 2 w0F0(n) + w1F1(n) + w2F2(n) + w3F3(n) w F (n) + 3 3 . w0F0(n) + w1F1(n) + w2F2(n) + w3F3(n) w F (n) + w F (n) + w F (n) + w F (n) = 0 0 1 1 2 2 3 3 w0F0(n) + w1F1(n) + w2F2(n) + w3F3(n) = 1

Hence, partition of unity holds.

5. Rational Trigonometric B-Spline and NURBS Curve Definition 3. Rational trigonometric B-spline and NURBS curve possessing shape parameter ξ is expressed generally as: 3 ∑ = (wj HjFj(n)) ( ) = j 0 Z n 3 , ∑j=0(wjFj(n)) or 3 Z(n) = ∑ HjQj(n), j=0 where Hj = H0, ..., Hn are control points, wjs are non-negative weights, and Fj(n) are trigonometric B-spline basis.

5.1. Properties of Rational Trigonometric B-Spline and NURBS Curve

5.1.1. Convex Hull Property Rational trigonometric B-spline and NURBS curves always lie inside the convex hull of control polygon as shown in Figures6 and7, respectively.

12

10

8

6

4

2

4 6 8 10 12 14 16 18 20

Figure 6. Convex hull of rational trigonometric curve. Mathematics 2020, 8, 2102 9 of 25

4

3

2

1

0

-1

-2 0 1 2 3 4 5 6

Figure 7. Convex hull of NURBS curve. 5.1.2. Affine Transformation Let T be an affine transformation, then:

n n ∑j=0(wj HjFj,d(n)) ∑j=0(wjT(Hj)Fj,d(n)) T( n ) = n . ∑j=0(wjFj,d(n)) ∑j=0(wjFj,d(n))

5.1.3. Local Approximation The shape of the curve can be distorted, either by changing the control points or weights. In Figure8, the curve is without any change of control point and weight. Figure9 explains that the change of control points affect the curve locally. Similarly, in Figure 10, a change of weight can be seen clearly.

10

9

8

7

6

5

4

3

2

1 4 6 8 10 12 14

Figure 8. Without changing the weight and control point.

Figure 9. The effect of changing the control point. Mathematics 2020, 8, 2102 10 of 25

Figure 10. The effect of changing the weight.

5.1.4. Continuity Theorem 7. The rational trigonometric B-spline and NURBS curve has C3 continuity. These curve have C3−k continuity, k = [0, 4]. The curve becomes discontinuous at k = 4.

Proof of Theorem7. See AppendixE

5.2. Floating and Periodic Rational Trigonometric B-Spline and NURBS Curve

5.2.1. Floating Rational and NURBS Curve A floating curve is also known as an open curve, such curves whose first and last point does not meet. Figures 11 and 12 show the floating rational trigonometric B-spline and NURBS curve, respectively. A total of 36 control points are used to construct rational trigonometric curve possessing ξ = 3, 0 for the blue and red color, respectively. The control polygon of NURBS is formed possessing ξ = 3 see Figure 12.

11

10

9

8

7

6

5

4

3

0 2 4 6 8 10

Figure 11. Floating rational trigonometric curve with different ξ. Mathematics 2020, 8, 2102 11 of 25

8

6

4

2

0

-2

-4

0 2 4 6 8 10 12 14 16 18

Figure 12. Floating NURBS curve with ξ = 3.

5.2.2. Periodic Rational and NURBS Curve In Figures 13 and 14 the periodic rational trigonometric B-spline and NURBS curve is constructed. The generated rational trigonometric curve consists of 12 control points.

Figure 13. Periodic rational curve with different ξ.

10

9

8

7

6

5

4

3

2

1

0 0 1 2 3 4 5 6 7 8 9 10

Figure 14. Periodic NURBS curve with ξ = 3.

The shape parameter and weight make the designing of the Rational and NURBS curve more smooth and accurate.

5.3. Application of B-Spline and Uniform Rational Trigonometric B-Spline Curve Proposed cubic trigonometric curves have been used for 2D and 3D modeling like in Figure 15, and we have designed an aeroplane with 107 control points with the shape parameter ξ = 0.4. Mathematics 2020, 8, 2102 12 of 25

The execution time for this model is 0.578 s. In Figure 16, glass has been designed using 25 control points and ξ = 2. The CPU time recorded for this model is 0.209 s. An apple has been designed in a 2D form using the proposed method as shown in Figure 17. Different control points with ξ = 3 is used for this model. Lastly, proposed curves have been used to design a vase in 3D form as shown in Figure 18. The shape parameter ξ = 2 is used in this model. The execution time for this model is 0.593 s.

Figure 15. Aeroplane design using cubic trigonometric B-spline curves.

Figure 16. Glass design using cubic trigonometric B-spline curve.

Figure 17. Apple designing using rational B-spline curve. Mathematics 2020, 8, 2102 13 of 25

Figure 18. 3D vase mesh design using cubic trigonometric B-spline curves.

5.4. Conclusions Cubic trigonometric and rational cubic trigonometric B-spline basis functions and curves with shape parameter ξ were derived in this paper. The cubic trigonometric B-spline curves were C3 and C5 continuous at uniform and non-uniform knots and were derived. Rational cubic trigonometric B-spline curves were C3 continuous for both uniform and non-uniform knots. Both cubic polynomial and cubic rational basis and curves obeyed the basic properties and were derived in this paper. The rendering of floating and periodic curves reflected the flexibility and applicability of the proposed method. Different 2D and 3D models were designed using the proposed curves successfully. This curve was more flexible, easy to use, and had a larger parametric range than the existing scheme. This work can be extended by adding shape parameter, using higher degree in functions, and by constructing the surface using proposed curves.

Author Contributions: Methodology, A.M., M.A. and F.Q.; software, A.M., M.A., F.Q., and T.N.; formal analysis, A.M., M.A., F.Q., K.T.M., M.Y.M. and T.N.; writing, original draft preparation, A.M., M.A. and F.Q.; Investigation, A.M., M.A., M.Y.M., and T.N.; writing, review and editing, A.M., M.A., F.Q., K.T.M., M.Y.M. and T.N.; visualization, A.M., M.A., F.Q., K.T.M., M.Y.M. and T.N.; resources, M.A. and K.T.M.; supervision, A.M., M.A. and K.T.M.; funding acquisition, M.A., and K.T.M. All authors have read and agreed to the published version of the manuscript. Funding: This work was supported by Universiti Sains Malaysia under Short Term Grant 304/PMATHS/6315223. Acknowledgments: 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. Conflicts of Interest: The authors declare no conflict of interest.

Abbreviations The following abbreviations are used in this manuscript:

2D two dimensional 3D three dimensional CAD computer-aided design NURBS non-uniform rational B-spline C3 parametric continuity of degree three C5 parametric continuity of degree five CPU central processing unit Mathematics 2020, 8, 2102 14 of 25

Appendix A

Proof. We use basis functions F0(n), F1(n), F2(n) and F3(n) defined in Equation (5). Thus, we get,

3 3 3 ∑ Fj(n) = dj(l0(tj)) + ∑ bj,k(lk)(tj) + ∑ cj,k(lk)(tj) + aj(l3(tj)). j=0 k=0 k=0

3 1 F (n) = (1 − sin t )2(ξ2 − ξ + 1 − sint ) (A1) ∑ j 2 − + j j j=0 6ξ 6ξ 10 1 + (1 + cost )2(ξ2 − ξ + 1 + cost ) 6ξ2 − 6ξ + 10 j j 1 + (1 + sint )2(ξ2 − ξ + 1 + sint ) 6ξ2 − 6ξ + 10 j j 1 + (1 − cost )2(ξ2 − ξ + 1 − cost ). 6ξ2 − 6ξ + 10 j j 3 1 F (n) = (ξ2 − ξ + 1 − (1 + 2(ξ2 − ξ + 1))sint + (2 + ξ2 − ξ + 1)sin2t − sin3t ) ∑ j 2 − + j j j j=0 6ξ 6ξ 10 1 + (ξ2 − ξ + 1 + (1 + 2(ξ2 − ξ + 1))cost + (2 + ξ2 − ξ + 1)cos2t + cos3t ) 6ξ2 − 6ξ + 10 j j j 1 + (ξ2 − ξ + 1 + (1 + 2(ξ2 − ξ + 1))sint + (2 + ξ2 − ξ + 1)sin2t + sin3t ) 6ξ2 − 6ξ + 10 j j j 1 + (ξ2 − ξ + 1 − (1 + 2(ξ2 − ξ + 1))cost + (2 + ξ2 − ξ + 1)cos2t − cos3t ). 6ξ2 − 6ξ + 10 j j j 3 1 F (n) = [ξ2 − ξ + 1 − (1 + 2(ξ2 − ξ + 1))sint + (2 + ξ2 − ξ + 1)sin2t − sin3t ∑ j 2 − + j j j j=0 6ξ 6ξ 10 2 2 2 2 3 +ξ − ξ + 1 + (1 + 2(ξ − ξ + 1))costj + (2 + ξ − ξ + 1)cos tj + cos tj 2 2 2 2 3 +ξ − ξ + 1 + (1 + 2(ξ − ξ + 1))sintj + (2 + ξ − ξ + 1)sin tj + sin tj 2 2 2 2 3 +ξ − ξ + 1 − (1 + 2(ξ − ξ + 1))costj + (2 + ξ − ξ + 1)cos tj − cos tj]. 3 1 F (n) = [4(ξ2 − ξ + 1) + (2 + ξ2 − ξ + 1) + (2 + ξ2 − ξ + 1)]. ∑ j 2 − + j=0 6ξ 6ξ 10 3 1 F (n) = [4(ξ2 − ξ + 1) + 2(2 + ξ2 − ξ + 1)]. ∑ j 2 − + j=0 6ξ 6ξ 10 3 1 F (n) = [4ξ2 − 4ξ + 4 + 4 + 2ξ2 − ξ + 2]. ∑ j 2 − + j=0 6ξ 6ξ 10 3 1 F (n) = [6ξ2 − 6ξ + 10]. ∑ j 2 − + j=0 6ξ 6ξ 10 3 ∑ Fj(n) = 1. (A2) j=0 Mathematics 2020, 8, 2102 15 of 25

Appendix B

Proof. The first and fourth term of equation (1) contains only a single term so Fj(n) > 0. The third 1 term involves summation, so we need to show it is either positive or not. For this let z = tan 2 t. Here t ∈ [0, 1].

3 ∑ bj+2,i(li(tj+2)) = bj+2,0l0(tj+2) + bj+2,1l1(tj+2) + bj+2,2l2(tj+2) + bj+2,3l3(tj+2). i=0

Let s(ξ) = ξ2 − ξ + 1.

3 2 3 ∑ bj+2,i(li(tj+2)) = bj+2,0[s(ξ) − (1 + 2(s(ξ)))sintj+2 + (2 + s(ξ))sin tj+2 − sin tj+2] i=0 2 3 +bj+2,1[s(ξ) + (1 + 2(s(ξ)))costj+2 + (2 + s(ξ))cos tj+2 + cos tj+2] 2 3 +bj+2,2[s(ξ) + (1 + 2(s(ξ)))sintj+2 + (2 + s(ξ))sin tj+2 + sin tj+2] 2 3 +bj+2,3[s(ξ) − (1 + 2(s(ξ)))costj+2 + (2 + s(ξ))cos tj+2 − cos tj+2].

3 ∑ bj+2,i(li(tj+2)) = (s(ξ))[bj+2,0 + bj+2,1 + bj+2,2 + bj+2,3] i=0

+ (1 + 2(s(ξ)))[(bj+2,2 − bj+2,0)sintj+2 + (bj+2,1 − bj+2,3)costj+2] 2 2 + (2 + s(ξ))[(bj+2,2 + bj+2,0)sin tj+2 + (bj+2,1 + bj+2,3)cos tj+2] 3 3 + [(bj+2,2 − bj+2,0)sin tj+2 + (bj+2,1 − bj+2,3)cos tj+2].

2 sint = 2z cost = 1−z After substituting 1+z2 , 1+z2 the equation above becomes

3 ∑ bj+2,i(li(tj+2)) = s(ξ)[bj+2,0 + bj+2,1 + bj+2,2 + bj+2,3] i=0 2z 1 − z2 + (1 + 2(s(ξ)))[(b + − b + )( ) + (b + − b + )( )] j 2,2 j 2,0 1 + z2 j 2,1 j 2,3 1 + z2 4z2 (1 − z2)2 + (2 + s(ξ))[(b + + b + )( ) + (b + + b + )( )] j 2,2 j 2,0 (1 + z2)2 j 2,1 j 2,3 (1 + z2)2 8z3 (1 − z2)3 + [(b + − b + )( ) + (b + − b + )( )]. j 2,2 j 2,0 (1 + z2)3 j 2,1 j 2,3 (1 + z2)3

3 1 b (l (t )) = ( )3[s(ξ)(1 + z2)3(b + b + b + b ) ∑ j+2,i i j+2 + 2 j+2,0 j+2,1 j+2,2 j+2,3 i=0 1 z 2 2 (1 + 2(s(ξ)))(bj+2,2 − bj+2,0)(2z)(1 + z ) 2 2 2 + (1 + 2(s(ξ)))(bj+2,1 − bj+2,3)((1 − z )(1 + z ) ) 2 2 + (2 + s(ξ))(bj+2,2 + bj+2,0)((4z )(1 + z )) 2 2 2 + (bj+2,1 + bj+2,3)((1 − z ) (1 + z )) 3 + (bj+2,2 − bj+2,0)(8z ) 2 3 + (bj+2,1 − bj+2,3)((1 − z ) )]. Mathematics 2020, 8, 2102 16 of 25

Comparing the coefficients of z6, z5, z4, z3, z2, z and constants, we get:

3 6 ∑ bj+2,i(li(tj+2)) = {[(s(ξ)(bj+2,0 + bj+2,2) + 2(1 + 2s(ξ))bj+2,3 + 2bj+2,1)z i=0 5 + (2(1 + 2(s(ξ)))(bj+2,2 − bj+2,0))z 4 + ((8 + 7(s(ξ)))(bj+2,0 + bj+2,2) + 4(s(ξ) − 1)bj+2,3)z 3 + (4(2s(ξ) + 3)(bj+2,2 − bj+2,0))z 2 + ((8 + 7s(ξ))(bj+2,0 + bj+2,2) + 4(s(ξ) − 1)bj+2,1)z

+ (2(1 + 2s(ξ))(bj+2,2 − bj+2,0))z

+ s(ξ)(bj+2,0 + bj+2,2) + 4(s(ξ) + 1)bj+2,1]}.

From the above equation, we get:

6 1 ( )[y zk] > 0 for all z ∈ [0, 1). ∑ ( + 2)3 k k=0 1 z

Here, y0 = s(ξ)(bj+2,0 + bj+2,2) + 4(s(ξ + 1)bj+2,1), y1 = 2(1 + 2s(ξ))(bj+2,2 − bj+2,0), y2 = (8 + 7s(ξ))(bj+2,0 + bj+2,2) + 4(s(ξ − 1)bj+2,1), y3 = 4(3 + 2s(ξ))(bj+2,2 − bj+2,0), y4 = (8 + 7s(ξ))(bj+2,0 + bj+2,2) + 4(s(ξ − 1)bj+2,3), y5 = 2(1 + 2s(ξ))(bj+2,2 − bj+2,0), y6 = s(ξ)(bj+2,2 + bj+2,0) + 2(1 + 2s(ξ))bj+2,3 + 2bj+2,1.

The theorem clearly follows for n ∈ [nj+1, nj+2).

Appendix C − Proof. In the knot interval n ∈ [nj, nj+1), the derivatives are taken at knot nj+1 of equation (1) as:

− Fj(nj+1) = s(ξ)aj. 0 − π Fj (nj+1) = ( 2 )(1 + 2s(ξ))aj. 00 − π 2 Fj (nj+1) = ( 2 ) (2(2 + s(ξ)))aj. 000 − π 3 Fj (nj+1) = ( 2 ) (5 − 2s(ξ))aj. iv − π 4 Fj (nj+1) = (− 2 ) [8(2 + s(ξ))aj]. v − π 5 Fj (nj+1) = ( 2 ) [(2s(ξ) − 59)aj].

+ The above derivatives are at the same knot nj . It is clearly evaluated that all other derivative vanishes at this knot except the fourth derivative. π Fiv(n+) = ( )4[(6 + 6s(ξ))a ]. (A3) j j 2 j + In the knot interval n ∈ [nj+1, nj+2), the derivatives are taken at knot nj+1 as: Mathematics 2020, 8, 2102 17 of 25

+ Fj(nj+1) = s(ξ)(cj+1,0 + cj+1,2) + 4(s(ξ) + 1)cj+1,1. 0 + π Fj (nj+1) = ( 2 )(1 + 2s(ξ))(cj+1,2 − cj+1,0). 00 + π 2 Fj (nj+1) = ( 2 ) (2(2 + s(ξ)))(cj+1,0 − 2cj+1,1 + cj+1,2). 000 + π 3 Fj (nj+1) = ( 2 ) (2s(ξ) − 5)(cj+1,0 − cj+1,2). iv + π 4 Fj (nj+1) = (− 2 ) [8(2 + s(ξ))(cj+1,0 − cj+1,1 + cj+1,2 − cj+1,3) − 2(s(ξ) + 11)(cj+1,1 − cj+1,3)]. v + π 5 Fj (nj+1) = (− 2 ) [(2s(ξ) − 59)(cj+1,0 − cj+1,2)].

− Derivatives at knot nj+2 are:

− Fj(nj+2) = s(ξ)(cj+1,1 + cj+1,3) + 4(s(ξ) + 1)cj+1,2. 0 − π Fj (nj+2) = ( 2 )(1 + 2s(ξ))(cj+1,3 − cj+1,1). 00 − π 2 Fj (nj+2) = ( 2 ) (2(2 + s(ξ)))(cj+1,1 − 2cj+1,2 + cj+1,3). 000 − π 3 Fj (nj+2) = ( 2 ) (2s(ξ) − 5)(cj+1,1 − cj+1,3). iv − π 4 Fj (nj+2) = (− 2 ) [8(2 + s(ξ))(cj+1,3 − cj+1,2 − cj+1,0) − 2(s(ξ) + 11)(cj+1,2 − cj+1,0)]. v − π 5 Fj (nj+2) = (− 2 ) [(2s(ξ) − 59)(cj+1,1 − cj+1,3)].

+ In the knot interval n ∈ [nj+2, nj+3), the derivatives are taken at knot nj+2 as:

+ Fj(nj+2) = s(ξ)(bj+2,0 + bj+2,2) + 4(s(ξ) + 1)bj+2,1. 0 + π Fj (nj+2) = ( 2 )(1 + 2s(ξ))(bj+2,2 − bj+2,0). 00 + π 2 Fj (nj+2) = ( 2 ) (2(2 + s(ξ)))(bj+2,0 − 2bj+2,1 + bj+2,2). 000 + π 3 Fj (nj+2) = ( 2 ) (2s(ξ) − 5)(bj+2,0 − bj+2,2). iv + π 4 Fj (nj+2) = ( 2 ) [8(2 + s(ξ))(bj+2,1 − bj+2,0 − bj+2,2 + bj+2,3) + 2(s(ξ) + 11)(bj+2,1 − bj+2,3)]. v + π 5 Fj (nj+2) = ( 2 ) [(2s(ξ) − 59)(bj+2,2 − bj+2,0)].

− Derivatives at knot nj+3 are:

− Fj(nj+3) = s(ξ)(bj+2,1 + bj+2,3) + 4(s(ξ) + 1)bj+2,2. 0 − π Fj (nj+3) = ( 2 )(1 + 2s(ξ))(bj+2,3 − bj+2,1). 00 − π 2 Fj (nj+3) = ( 2 ) (2(2 + s(ξ)))(bj+2,1 − 2bj+2,2 + bj+2,3). 000 − π 3 Fj (nj+3) = ( 2 ) (2s(ξ) − 5)(bj+2,1 − bj+2,3). iv − π 4 Fj (nj+3) = ( 2 ) [8(2 + s(ξ))(bj+2,0 − bj+2,1 + bj+2,2 − bj+2,3) + 2(s(ξ) + 11)(bj+2,2 − bj+2,0)]. v − π 5 Fj (nj+3) = ( 2 ) [(2s(ξ) − 59)(bj+2,3 − bj+2,1)].

+ In the knot interval n ∈ [nj+3, nj+4), the derivatives are taken at knot nj+3 as:

+ Fj(nj+3) = s(ξ)dj+3. 0 + π Fj (nj+3) = (− 2 )(1 + 2s(ξ))dj+3. 00 + π 2 Fj (nj+3) = ( 2 ) (2(2 + s(ξ)))dj+3. 000 + π 3 Fj (nj+3) = ( 2 ) (2s(ξ) − 5)dj+3. iv + π 4 Fj (nj+3) = (− 2 ) [8(2 + s(ξ))dj+3]. v + π 5 Fj (nj+3) = ( 2 ) [(59 − 2s(ξ))dj+3]. Mathematics 2020, 8, 2102 18 of 25

Appendix D + Proof. The derivatives at knot nj are evaluated as:

+ T(nj ) = s(ξ)djS0 + [s(ξ)bj,0 + 4(s(ξ) + 1)bj,1 + s(ξ)bj,2]S1, + [s(ξ)cj,0 + 4(s(ξ) + 1)cj,1 + s(ξ)cj,2]S2, π T0(n+) = ( ){(1 + 2s(ξ))[−d S + (b − b )S + (c − c )S ]}, j j 2 j 0 j,2 j,0 1 j,2 j,0 2

π T00(n+) = ( )2{2((2 + s(ξ)))[d S + (b − 2b + b )S + (c − 2c + c )S ]}, j j 2 j 0 j,0 j,1 j,2 1 j,0 j,1 j,2 2 π T000(n+) = ( )3{(5 + 2s(ξ))[d S + (b − b )S + (c − c )S ]}, j j 2 j 0 j,0 j,2 1 j,0 j,2 2

π Tiv(n+) = −( )4{[8(2 + s(ξ))(d S + (b − b + b − b )S + (c − c + c − c )S + a S ) j j 2 j 0 j,0 j,1 j,2 j,3 1 j,0 j,1 j,2 j,3 2 j 3 + 2(s(ξ) + 11)[(bj,1 − bj,3)S1 + (cj,1 − cj,3)S2 − ajS3]]}, π Tv(n+) = −( )5{[(59 − 2s(ξ))(d S + (b − b )S + (c − c + c )S )]}, j j 2 j 0 j,0 j,2 1 j,0 j,2 j,2 2 where s(ξ) = ξ2 − ξ + 1.

− The derivatives at knot nj+1 are evaluated as:

− T(nj+1) = [s(ξ)bj,1 + 4(s(ξ) + 1)bj,2 + s(ξ)bj,3]S1 + [s(ξ)cj,1 + 4(s(ξ) + 1)cj,2 + s(ξ)cj,3]S2 + s(ξ)ajS3, π T0(n− ) = ( ){(1 + 2s(ξ))[(b − b )S + (c − c )S + a S ]}, j j+1 2 j,3 j,1 1 j,3 j,1 2 j 3 π T00 (n−) = ( )2{2((2 + s(ξ)))[(b − 2b + b )S + (c − 2c + c )S + a S ]}, j+1 j 2 j,1 j,2 j,3 1 j,1 j,2 j,3 2 j 3 π T000(n− ) = ( )3{(1 + 2s(ξ))[(b − b )S + (c − c )S + a S ]}, j j+1 2 j,1 j,3 1 j,1 j,3 2 j 3

π Tiv(n− ) = ( )4{[8(2 + s(ξ))(d S + (b − b + b − b )S + (c − c + c − c )S − a S ) j j+1 2 j 0 j,0 j,1 j,2 j,3 1 j,0 j,1 j,2 j,3 2 j 3 + 2(s(ξ) + 11)[djS0 + (bj,2 − bj,0)S1 + (cj,2 − cj,0)S2]]}, π Tv(n− ) = ( )5{[(2s(ξ) − 59)((b − b )S + (c − c )S ) + a S ]}. j j+1 2 j,3 j,1 1 j,3 j,1 2 j 3

Appendix E

Proof. The continuity for knot interval n ∈ [nj, nj+1) is derived as:

1. Continuity of NURBS curve

+ At knot nj

+ s(ξ)djw0 H0 Q0(nj ) = . (A4) s(ξ)djw0 + [s(ξ)(bj0 + bj2) + 4(s(ξ) + 1)bj1]w1 + [s(ξ)(cj0 + cj2) + 4(s(ξ) + 1)cj1]w2 Mathematics 2020, 8, 2102 19 of 25

+ s(ξ)(bj0 + bj2) + 4(s(ξ) + 1)bj1w1 H1 Q1(nj ) = . (A5) s(ξ)djw0 + [s(ξ)(bj0 + bj2) + 4(s(ξ) + 1)bj1]w1 + [s(ξ)(cj0 + cj2) + 4(s(ξ) + 1)cj1]w2

+ s(ξ)(cj0 + cj2) + 4(s(ξ) + 1)cj1w2 H2 Q2(nj ) = . (A6) s(ξ)djw0 + [s(ξ)(bj0 + bj2) + 4(s(ξ) + 1)bj1]w1 + [s(ξ)(cj0 + cj2) + 4(s(ξ) + 1)cj1]w2 + Q3(nj ) = 0. (A7) − At knot nj+1 − Q0(nj+1) = 0. (A8)

− [s(ξ)(bj1 + bj3) + 4(s(ξ) + 1)bj2]w1 H1 Q1(nj+1) = . (A9) [s(ξ)(bj1 + bj3) + 4(s(ξ) + 1)bj2]w1 + [s(ξ)(cj1 + cj3) + 4(s(ξ) + 1)cj2]w2 + s(ξ)ajw3

− [s(ξ)(cj1 + cj3) + 4(s(ξ) + 1)cj2]w2 H2 Q2(nj+1) = . (A10) [s(ξ)(bj1 + bj3) + 4(s(ξ) + 1)bj2]w1 + [s(ξ)(cj1 + cj3) + 4(s(ξ) + 1)cj2]w2 + s(ξ)ajw3

− s(ξ)ajw3 H3 Q3(nj+1) = . (A11) [s(ξ)(bj1 + bj3) + 4(s(ξ) + 1)bj2]w1 + [s(ξ)(cj1 + cj3) + 4(s(ξ) + 1)cj2]w2 + s(ξ)ajw3 + First derivative at knot nj Let A = s(ξ)djw0 + [s(ξ)(bj0 + bj2) + 4(s(ξ) + 1)bj1]w1 + [s(ξ)(cj0 + cj2) + 4(s(ξ) + 1)cj1]w2.

π [− 2q ](1 + 2s(ξ))[A + s(ξ)(−djw0 + (bj2 − bj0)w1 + (cj2 − cj0)w2)]djw0 H0 Q0 (n+) = j . (A12) 0 j A2

(b − b )A − [s(ξ)(b + b ) + 4(s(ξ) + 1)b ] " j2 j0 j0 j2 j1 # π [−djw0 + (bj − bj )w + (cj − cj )w2] 0 ( +) = ( )( + ( )) 2 0 1 2 0 Q1 nj 1 2s ξ 2 w1 H1. (A13) 2qj A

(c − c )A − [s(ξ)(c + c ) + 4(s(ξ) + 1)c ] " j2 j0 j0 j2 j1 # π [−djw0 + (bj − bj )w + (cj − cj )w2] 0 ( +) = ( )( + ( )) 2 0 1 2 0 Q2 nj 1 2s ξ 2 w2 H2. (A14) 2qj A

0 + Q3(nj ) = 0. (A15) − First derivative at knot nj+1 B = [s(ξ)(bj1 + bj3) + 4(s(ξ) + 1)bj2]w1 + [s(ξ)(cj1 + cj3) + 4(s(ξ) + 1)cj2]w2 + s(ξ)ajw3.

0 − Q0(nj+1) = 0. (A16)

(b − b )B − [s(ξ)(b + b ) + 4(s(ξ) + 1)b ] " j3 j1 j1 j3 j2 # π [(bj − bj )w + (cj − cj )w2 + ajw3] 0 ( − ) = ( )( + ( )) 3 1 1 3 1 Q1 nj+1 1 2s ξ 2 w1 H1. (A17) 2qj B

(c − c )B − [s(ξ)(c + c ) + 4(s(ξ) + 1)c ] " j3 j1 j1 j3 j2 # π [(bj − bj )w + (cj − cj )w2 + ajw3] 0 ( − ) = ( )( + ( )) 3 1 1 3 1 Q2 nj+1 1 2s ξ 2 w2 H2. (A18) 2qj B

π [ 2q ](1 + 2s(ξ))[B − s(ξ)((bj3 − bj1)w1 + (cj3 − cj1)w2 + ajw3)]ajw3 H3 Q0 (n− ) = j . (A19) 3 j+1 B2 Mathematics 2020, 8, 2102 20 of 25

+ Second derivative at knot nj

" A− # π [s(ξ)(2s(ξ) − 5)(djw0 + (bj − bj )w + (cj − cj )w2)] 00( +) = ( )2( ( ( ) + )) 0 2 1 0 2 Q0 nj 2 s ξ 2 2 djw0 H0 2qj A (A20) [−djw0 + (bj − bj )w1 + (cj − cj )w2] " 2 0 2 0 # π [A + [s(ξ)(−djw0 + (bj − bj )w + (cj − cj )w2)]] + ( )2( + ( )) 2 0 1 2 0 2 1 2s ξ 3 djw0 H0. 2qj A

A[b − 2b + b ]− " j0 j1 j2 # π J[s(ξ)(bj + bj ) + 4(s(ξ) + 1)bj ] 00( +) = ( )2( ( ( ) + )) 0 2 1 Q1 nj 2 s ξ 2 2 w1 H1 2qj A (A21) A[(1 + 2s(ξ))(b − b )] " j2 j0 # π [M[s(ξ)(bj + bj ) + 4(s(ξ) + 1)bj ]] − ( )2( + ( )) 0 2 1 2 1 2s ξ M 3 w1 H1. 2qj A

A[c − 2c + c ] " j0 j1 j2 # π − [s(ξ)(cj + cj ) + 4(s(ξ) + 1)cj ]J 00( +) = ( )2( ( ( ) + )) 0 2 1 Q2 nj 2 s ξ 2 2 w2 H2 2qj A (A22) A[(1 + 2s(ξ))(c − c )] " j2 j0 # π [M[s(ξ)(cj + cj ) + 4(s(ξ) + 1)cj ]] − ( )2( + ( )) 0 2 1 2 1 2s ξ M 3 w2 H2. 2qj A

00 + Q3 (nj ) = 0. (A23) where J = djw0 + (bj0 − 2bj1 + bj2)w1 + (cj0 − 2cj1 + cj2)w2 and M = −djw0 + (bj2 − bj0)w1 + (cj2 − cj0)w2. − Second derivative at knot nj+1 Let K = (bj1 − 2(bj2) + bj3)w1 + (cj1 − 2(cj2) + cj3)w2 + ajw3 and L = (bj3 − bj1)w1 + (cj3 − cj1)w2 + ajw3. 00 − Q0 (nj+1) = 0. (A24) B[b − 2b + b ]− " j1 j2 j3 # π K[s(ξ)(bj + bj ) + 4(s(ξ) + 1)bj ] 00( − ) = ( )2( ( ( ) + )) 1 3 2 Q1 nj+1 2 s ξ 2 2 w1 H1 2qj B (A25) B[(1 + 2s(ξ))(b − b )] " j3 j1 # π [L[s(ξ)(bj + bj ) + 4(s(ξ) + 1)bj ]] − ( )2( + ( )) 1 3 2 2 1 2s ξ L 3 w1 H1. 2qj B

B[c − 2c + c ]− " j1 j2 j3 # π K[s(ξ)(cj + cj ) + 4(s(ξ) + 1)cj ] 00( − ) = ( )2( ( ( ) + )) 1 3 2 Q2 nj+1 2 s ξ 2 2 w2 H2 2qj B (A26) B[(1 + 2s(ξ))(c − c )] " j3 j1 # π [L[s(ξ)(cj + cj ) + 4(s(ξ) + 1)cj ]] − ( )2( + ( )) 1 3 2 2 1 2s ξ L 3 w2 H2. 2qj B

" B− # π [s(ξ)(2s(ξ) − 5)[(bj1 − bj3)w1 + (cj1 − cj3)w2 + ajw3]] Q00(n− ) = ( )2(2(s(ξ) + 2)) a w H 3 j+1 2q B2 j 3 3 j (A27) " # π B − [s(ξ)L] − ( )2( + ( )) 2 1 2s ξ L 3 ajw3 H3. 2qj B Mathematics 2020, 8, 2102 21 of 25

+ Third derivative at knot nj

Let m(ξ)2 = (1 + 2s(ξ))2(2 + s(ξ)), g(ξ) = 2(2s(ξ) − 5) and e(ξ) = (1 + 2s(ξ))3.

[(s(ξ)bj + 2(s(ξ) + 1)bj )w1 + (s(ξ)cj + 2(s(ξ) + 1)cj )w2]+ " 2 1 2 1 # π [4(2s(ξ) + 1)(s(ξ) + 2)[(bj − bj )w + (cj − cj )w2]] 000( +) = ( )3 ( ) 2 1 1 2 1 Q0 nj g ξ djw0 H0 2 2qj A

(2 + 3s(ξ))M(bj1w1 + cj1w2) − 2J[(s(ξ)bj2 + 2(s(ξ) + 1)bj1)w1 " # (A28) π + (s(ξ)cj + 2(s(ξ) + 1)cj )w2] − ( )3( ( ))2 2 1 8 s ξ djw0 H0 3 2qj A " # π M[(s(ξ)bj2 + 2(s(ξ) + 1)bj1)w1 + (s(ξ)cj2 + 2(s(ξ) + 1)cj1)w2] − ( )3e( )d w H 12 ξ j 0 0 4 . 2qj A

[(−2s(ξ)b − 4(s(ξ) + 1)b )(2s(ξ) − 5)− " j2 j1 # π 4(2s(ξ) + 1)(s(ξ) + 2)((bj − bj ))] 000( +) = ( )3 2 1 Q1 nj djw0w1 H1 2 2qj A 2M[A(b − 2b + b ) − [(s(ξ)(b + b ) + 4(s(ξ) + 1)b )J]] " j0 j1 j2 j0 j2 j1 # π − 2J[A(bj − bj ) − (s(ξ)(bj + bj ) + 4(s(ξ) + 1)bj )M] − ( )3 2 0 0 2 1 (A29) 2 3 w1 H1 2qj A [A(b − b )−] " j2 j0 # π (s(ξ)(bj + bj ) + 4(s(ξ) + 1)bj )M] + ( )3( + ( ))3 2 0 2 1 6 1 2s ξ M 3 w1 H1. 2qj A

[(−2s(ξ)c − 4(s(ξ) + 1)c )(2s(ξ) − 5)− " j2 j1 # π 4(2s(ξ) + 1)(s(ξ) + 2)((cj − cj ))] 000( +) = ( )3 2 1 Q2 nj djw0w2 H2 2 2qj A 2M[A(c − 2c + c ) − [(s(ξ)(c + c ) + 4(s(ξ) + 1)c )J]] " j0 j1 j2 j0 j2 j1 # π − 2J[A(cj − cj ) − (s(ξ)(cj + cj ) + 4(s(ξ) + 1)cj )M] − ( )3 2 0 0 2 1 (A30) 2 3 w2 H2 2qj A [A(c − c )−] " j2 j0 # π (s(ξ)(cj + cj ) + 4(s(ξ) + 1)cj )M] + ( )3( + ( ))3 2 0 2 1 6 1 2s ξ M 4 w2 H2. 2qj A

000 + Q3 (nj ) = 0. (A31) − Third derivative at knot nj+1 000 − Q0 (nj+1) = 0. (A32) [(−2s(ξ)b − 4(s(ξ) + 1)b )(2s(ξ) − 5)+ " j3 j2 # π 4(2s(ξ) + 1)(s(ξ) + 2)((bj − bj ))] 000( − ) = ( )3 1 2 Q1 nj+1 ajw3w1 H1 2 2qj B 2L[B(b − 2b + b ) − [(s(ξ)(b + b ) + 4(s(ξ) + 1)b )K]] " j1 j2 j3 j1 j3 j2 # π − 2K[B(bj − bj ) − (s(ξ)(bj + bj ) + 4(s(ξ) + 1)bj )L] − ( )3 3 1 1 3 2 (A33) 2 3 w1 H1 2qj B [B(b − b )−] " j3 j1 # π (s(ξ)(bj + bj ) + 4(s(ξ) + 1)bj )L] + ( )3( + ( ))3 2 1 3 2 6 1 2s ξ L 4 w1 H1. 2qj B Mathematics 2020, 8, 2102 22 of 25

[(−2s(ξ)c − 4(s(ξ) + 1)c )(2s(ξ) − 5)+ " j3 j2 # π 4(2s(ξ) + 1)(s(ξ) + 2)((cj − cj ))] 000( − ) = ( )3 1 2 Q2 nj+1 ajw3w2 H2 2 2qj B 2L[B(c − 2c + c ) − [(s(ξ)(c + c ) + 4(s(ξ) + 1)c )K]] " j1 j2 j3 j1 j3 j2 # π − 2K[B(cj − cj ) − (s(ξ)(cj + cj ) + 4(s(ξ) + 1)cj )L] − ( )3 3 1 1 3 2 (A34) 2 3 w2 H2 2qj B [B(c − c )−] " j3 j1 # π (s(ξ)(cj + cj ) + 4(s(ξ) + 1)cj )L] + ( )3( + ( ))3 2 1 3 2 6 1 2s ξ L 4 w2 H2. 2qj B

[(s(ξ)bj + 2(s(ξ) + 1)bj )w1 + (s(ξ)cj + 2(s(ξ) + 1)cj )w2]+ " 3 2 3 2 # π [4(2s(ξ) + 1)(s(ξ) + 2)[(bj − bj )w + (cj − cj )w2]] 000( − ) = ( )3 ( ) 3 2 1 3 2 Q3 nj+1 g ξ ajw3 H3 2 2qj B

(2 + 3s(ξ))L(bj2w1 + cj2w2) − 2K[(s(ξ)bj3 + 2(s(ξ) + 1)bj2)w1 " # (A35) π + (s(ξ)cj + 2(s(ξ) + 1)cj )w2] − ( )3( ( ))2 3 2 8 s ξ ajw3 H3 3 2qj B " # π L[(s(ξ)bj3 + 2(s(ξ) + 1)bj2)w1 + (s(ξ)cj3 + 2(s(ξ) + 1)cj2)w2] − ( )3e( )a w H 12 ξ j 3 3 4 . 2qj B

2. Continuity of Rational trigonometric B-spline curve

+ At knot nj .

+ s(ξ)w0 H0 Q0(nj ) = . (A36) [s(ξ)(w0 + w2) + 4(s(ξ) + 1)w1]

+ 4(s(ξ) + 1)w1 H1 Q1(nj ) = . (A37) [s(ξ)(w0 + w2) + 4(s(ξ) + 1)w1]

+ 4(s(ξ) + 1)w2 H2 Q2(nj ) = . (A38) [s(ξ)(w0 + w2) + 4(s(ξ) + 1)w1] + Q3(nj ) = 0. (A39) − At knot nj+1 − Q0(nj+1) = 0. (A40)

− 4(s(ξ) + 1)w1 H1 Q1(nj+1) = . (A41) [s(ξ)(w1 + w3) + 4(s(ξ) + 1)w2]

− 4(s(ξ) + 1)w2 H2 Q2(nj+1) = . (A42) [s(ξ)(w1 + w3) + 4s(ξ) + 1)w2]

− (s(ξ))w3 H3 Q3(nj+1) = . (A43) [s(ξ)(w1 + w3) + 4(s(ξ) + 1)w2] + First derivative at knot nj

( )( + ) + ( ( ) + ) " s ξ w0 w2 4 s ξ 1 w1 # π + s(ξ)(−w + w ) 0 ( +) = (− )( + ( )) 0 2 Q0 nj 1 2s ξ 2 w0 H0. (A44) 2qj [s(ξ)(w0 + w2) + 4(s(ξ) + 1)w1]

π (1 + 2s(ξ))[−4(s(ξ) + 1)(−w + w )]w H 0 ( +) = ( )[ 0 2 1 1 ] Q1 nj 2 . (A45) 2 [s(ξ)(w0 + w2) + 4(s(ξ) + 1)w1] Mathematics 2020, 8, 2102 23 of 25

( )( + ) + ( ( ) + ) " s ξ w0 w2 4 s ξ 1 w1 # π − s(ξ)(−w + w ) 0 ( +) = ( )( + ( )) 0 2 Q2 nj 1 2s ξ 2 w2 H2. (A46) 2qj [s(ξ)(w0 + w2) + 4(s(ξ) + 1)w1]

+ Q3(nj ) = 0 (A47) − First derivative at knot nj+1 − Q0(nj+1) = 0 (A48) ( )( + ) + ( ( ) + ) " s ξ w1 w3 4 s ξ 1 w2 # π − s(ξ)(−w + w ) 0 ( − ) = ( )( + ( )) 1 3 Q1 nj+1 1 2s ξ 2 w1 H1. (A49) 2qj [s(ξ)(w1 + w3) + 4(s(ξ) + 1)w2]

π (1 + 2s(ξ))[−4(s(ξ) + 1)(−w + w )]w H 0 ( − ) = ( )[ 1 3 2 2 ] Q2 nj+1 2 . (A50) 2 [s(ξ)(w1 + w3) + 4(s(ξ) + 1)w2] ( )( + ) + ( ( ) + ) " s ξ w1 w3 4 s ξ 1 w2 # π − s(ξ)(−w + w ) 0 ( − ) = ( )( + ( )) 1 3 Q3 nj+1 1 2s ξ 2 w3 H3. (A51) 2qj [s(ξ)(w1 + w3) + 4(s(ξ) + 1)w2]

+ Second derivative at knot nj

( )( + ) + ( ( ) + ) − " s ξ w0 w2 4 s ξ 1 w1 # π s(ξ)[(2s(ξ) − 5)(w − w )] 00( +) = ( )2( ( ( ) + )) 0 2 Q0 nj 2 s ξ 2 2 w0 H0 2qj [s(ξ)(w0 + w2) + 4(s(ξ) + 1)w1] (A52) ( )( + ) + ( ( ) + ) − " s ξ w0 w2 4 s ξ 1 w1 # π s(ξ)(−w + w ) + ( )2( + ( ))(− + ) 0 2 2 1 2s ξ w0 w2 3 w0 H0. 2qj [s(ξ)(w0 + w2) + 4(s(ξ) + 1)w1]

− [ ( )( + ) + ( ( ) + ) ]− " 2 s ξ w0 w2 4 s ξ 1 w1 # π 4(s(ξ) + 1)[(w − 2w + w )] Q00(n+) = ( )2(2(s(ξ) + 2)) 0 1 2 w H 1 j 2q [s(ξ)(w + w ) + 4(s(ξ) + 1)w ]2 1 1 j 0 2 1 (A53) " # π −4(s(ξ) + 1)(−w + w ) − ( )2( + ( ))(− + ) 0 2 2 1 2s ξ w0 w2 3 w1 H1. 2qj [s(ξ)(w0 + w2) + 4(s(ξ) + 1)w1]

[ ( )( + ) + ( ( ) + ) ]− " s ξ w0 w2 4 s ξ 1 w1 # π s(ξ)[(w − 2w + w )] Q00(n+) = ( )2(2(s(ξ) + 2)) 0 1 2 w H 2 j 2q [s(ξ)(w + w ) + 4(s(ξ) + 1)w ]2 2 2 j 0 2 1 (A54) " # π [s(ξ)(w + w ) + 4(s(ξ) + 1)w ] − ( )2( + ( ))(− + ) 0 2 1 2 1 2s ξ w0 w2 3 w2 H2. 2qj [s(ξ)(w0 + w2) + 4(s(ξ) + 1)w1]

00 + Q2 (nj ) = 0. (A55) − Second derivative at knot nj+1 00 − Q0 (nj+1) = 0. (A56) Mathematics 2020, 8, 2102 24 of 25

[ ( )( + ) + ( ( ) + ) ]− " s ξ w1 w3 4 s ξ 1 w2 # π 4(s(ξ) + 1)[(w − 2w + w )] 00( − ) = ( )2( ( ( ) + )) 1 2 3 Q1 nj+1 2 s ξ 2 2 w1 H1 2qj [s(ξ)(w1 + w3) + 4(s(ξ) + 1)w2] (A57) [ ( )( + ) + ( ( ) + ) ] " s ξ w1 w3 4 s ξ 1 w2 # π [(−(1 + 2s(ξ))) − (s(ξ)(−w + w ))] − ( )2( + ( ))(− + ) 1 3 2 1 2s ξ w1 w3 3 w1 H1. 2qj [s(ξ)(w1 + w3) + 4(s(ξ) + 1)w2]

− [ ( )( + ) + ( ( ) + ) ]− " 2 s ξ w3 w1 4 s ξ 1 w2 # π [4(s(ξ) + 1)][(w − 2w + w )] Q00(n− ) = ( )2(2(s(ξ) + 2)) 1 2 3 w H 2 j+1 2q [s(ξ)(w + w ) + 4(s(ξ) + 1)w ]2 2 2 j 1 3 2 (A58) " # π [4(s(ξ) + 1)(−w + w )] − ( )2( + ( ))(− + ) 1 3 2 1 2s ξ w1 w3 3 w2 H2. 2qj [s(ξ)(w1 + w3) + 4(s(ξ) + 1)w2]

( )( + ) + ( ( ) + ) − " s ξ w1 w3 4 s ξ 1 w2 # π s(ξ)[(2s(ξ) − 5)(w + w )] 00( − ) = ( )2( ( ( ) + )) 1 3 Q3 nj+1 2 s ξ 2 2 w3 H3 2qj [s(ξ)(w1 + w3) + 4(s(ξ) + 1)w2] (A59) ( )( + ) + ( ( ) + ) − " s ξ w1 w3 4 s ξ 1 w2 # π s(ξ)(−w + w ) + ( )2( + ( ))(− + ) 1 3 2 1 2s ξ w1 w3 3 w3 H3. 2qj [s(ξ)(w1 + w3) + 4(s(ξ) + 1)w2]

In similar manner, third derivative for uniform knots is evaluated.

References

1. Bashir, U.; Abbas, M.; Awang, M.N.H.; Ali, J.M. A class of quasi-quintic trigonometric Bézier curve with two shape parameters. Sci. Asia 2013, 39S, 11–15. [CrossRef] 2. Bashir, U.; Abbas, M.; Ali, J.M. The G2 and C2 rational quadratic trigonometric Bézier curve with two shape parameters with applications. J. Appl. Math. Comput. 2013, 219, 10183–10197. [CrossRef] 3. BiBi, S.; Abbas, M.; Misro, M.Y.; Hu, G. A Novel Approach of Hybrid Trigonometric Bézier Curve to the Modeling of Symmetric Revolutionary Curves and Symmetric Rotation Surfaces. IEEE Access. 2019, 7, 165779–165792. [CrossRef] 4. Maqsood, S.; Abbas, M.; Hu, G.; Ramli, A.L.A.; Miura, K.T. A Novel Generalization of Trigonometric Bézier Curve and Surface with Shape Parameters and Its Applications. Math. Probl. Eng. 2020, 2020, 4036434. [CrossRef] 5. Usman, M.; Abbas, M.; Miura, K.T. Some engineering applications of new trigonometric cubic Bézier-like curves to free-form complex curve modeling. J. Adv. Mech. Des. Syst. Manuf. 2020, 14, 19-00420. [CrossRef] 6. Hu, X.; Hu, G.; Abbas, M.; Misro, M.Y. Approximate multi-degree reduction of Q-Bézier curves via generalized Bernstein polynomial functions. Adv. Differ. Equ. 2020, 2020, 1–16. [CrossRef] 7. 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 2020, 8, 924. [CrossRef] 8. Majeed, A.; Abbas, M.; Miura, K.T.; Kamran, M.; Nazir, T. Surface Modeling from 2D Contours with an Application to Craniofacial Fracture Construction. Mathematics 2020, 8, 1246. [CrossRef] 9. Hu, G.; Li, H.; Abbas, M.; Miura, K.T.; Wei, G. Explicit Continuity Conditions for G1 Connection of S-λ Curves and Surfaces. Mathematics 2020, 8, 1359. [CrossRef] 10. Schoenberg, I.J. On trigonometric spline interpolation. J. Math. Mech. 1964, 13, 795–825. 11. Schoenberg, I.J. Spline interpolation and best quadrature formulae. Bull. Am. Math. Soc. 1964, 70, 143–148. [CrossRef] 12. Schoenberg, I.J. Spline interpolation and the higher derivatives. Proc. Natl. Acad. Sci. USA 1964, 51, 24. [CrossRef] Mathematics 2020, 8, 2102 25 of 25

13. Schoenberg, I.J. Interpolating splines as limits of polynomials. Linear Algebra Appl. 1983, 52, 617–628. [CrossRef] 14. Lyche, T.; Winther, R. A stable recurrence relation for trigonometric B-splines. J. Approx. Theory 1979, 25, 266–279. [CrossRef] 15. Walz, G. Identities for trigonometric B-splines with an application to curve design. Bit Numer. Math. 1997, 37, 189–201. [CrossRef] 16. Piegl, L.; Tiller, W. The NURBS Book; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2012. 17. Marsh, D. Applied Geometry for Computer Graphics and CAD; Springer: Berlin/Heidelberg, Germany, 2006. 18. Salomon, D. Curves and Surfaces for Computer Graphics; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2007. 19. Juhász, I.; Róth, Á. A scheme for interpolation with trigonometric spline curves. J. Comput. Appl. Math. 2014, 263, 246–261. [CrossRef] 20. Zhu, Y.P.; Han, X.L. New trigonometric basis possessing exponential shape parameters. J. Comput. Math. 2015, 33, 642–684. 21. Majeed, A.; Qayyum, F. New rational cubic trigonometric B-spline curves with two shape parameters. Comput. Appl. Math. 2020, 39, 1–24.. [CrossRef] 22. Han, X. Quadratic trigonometric polynomial curves with a shape parameter. Comput. Aided Geom. Des. 2002, 19, 503–512. [CrossRef] 23. Han, X. Cubic trigonometric polynomial curves with a shape parameter. Comput. Aided Geom. Des. 2004, 21, 535–548. [CrossRef] 24. Majeed, A.; Yahya, Z.R.; Abdullah, J.Y.; Rafique, M. Construction of occipital bone fracture using B-spline curves. Comput. Appl. Math. 2018, 37, 2877–2896. [CrossRef] 25. Choubey, N.; Ojha, A. Trigonometric splines with variable shape parameter. Rocky Mt. J. Math. 2008, 38, 91–105. [CrossRef] 26. Pagani, L.; Scott, P.J. Curvature based sampling of curves and surfaces. Comput. Aided Geom. Des. 2018, 59, 32–48. [CrossRef] 27. Majeed, A.; Mt Piah, A.R.; Yahya, Z.R. Surface reconstruction from parallel curves with application to parietal bone fracture reconstruction. PLoS ONE 2016, 11, e0149921. [CrossRef][PubMed] 28. Hu, G.; Qin, X.; Ji, X.; Wei, G.; Zhang, S. The construction of λµ-B-spline curves and its application to rotational surfaces. Appl. Math. Comput. 2015, 266, 194–211. [CrossRef] 29. Majeed, A.; Gobithaasan, R.U.; Yahya, Z.R. Craniofacial reconstruction using rational cubic ball curves. PLoS ONE 2015, 10, e0122854. [CrossRef][PubMed] 30. Yan, L.; Liang, J. A class of algebraic–trigonometric blended splines. J. Comput. Appl. Math. 2011, 235, 1713–1729. [CrossRef] 31. Troll, E. Constrained modification of the cubic trigonometric Bézier curve with two shape parameters. Ann. Math. Inform. 2014, 43, 145–156. 32. Stanimirovi´c,P.S.; Krtolica, P.V.; Saraˇcevi´c,M.H.; Mašovi´c,S.H. Decomposition of Catalan numbers and convex polygon triangulations. Int. J. Comput. Math. 2014, 91, 1315–1328. [CrossRef] 33. Saracevic, M.; SELIM˙ I,˙ A. Convex polygon triangulation based on planted trivalent binary tree and ballot problem. Turk. J. Electr. Eng. Comput. Sci. 2019, 27, 346–361. [CrossRef] 34. Troll, E.M.; Hoffmann, M. Geometric properties and constrained modification of trigonometric spline curves of Han. Ann. Math. Inform. 2010, 37, 165–175. 35. Han, X.A.; Ma, Y.; Huang, X. The cubic trigonometric Bézier curve with two shape parameters. Appl. Math. Lett. 2009, 22, 226–231. [CrossRef] 36. Xu, G.; Wang, G.Z. Extended cubic uniform B-spline and α-B-spline. Acta Autom. Sin. 2008, 34, 980–984. [CrossRef]

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

c 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).