# C

Authors: Shengjun Liu; Zhili Chen; Yuanpeng Zhu
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

A newC1 piecewise rational quadratic trigonometric spline with four local positive shape parameters in each subinterval is constructed to visualize the given planar data. Constraints are derived on these free shape parameters to generate shape preserving interpolation curves for positive and/or monotonic data sets. Two of these shape parameters are constrained while the other two can be set free to interactively control the shape of the curves. Moreover, the order of approximation of developed interpolant is investigated as O(h3). Numeric experiments demonstrate that our method can construct nice shape preserving interpolation curves efficiently.


---

## Body

## 1. Introduction

Shape preserving interpolation spline is an effective tool to visualize the data in the form of curves and surfaces. The problem of curve interpolation to the given data has been studied with various requirements, such as the smoothness of the interpolating curves, the preservation of the shape features of the data, the computational complexity, or the requirements of certain constraints. Shape preserving interpolation spline usually means that the generated spline preserves the positivity, monotonicity, and convexity of the given data. These shape characteristics can be easily obtained when data arises from a physical process or chemical experiment and so on. Therefore, it becomes vital that the interpolant can produce smooth curves and preserve the shape features of the given data.Trigonometric spline has been studied by many scholars because such spline can be used to exactly represent circular arcs and conics, which are the most basic geometrical entity in modeling system [1–3]. Recently, some approaches in shape preserving interpolation, using the trigonometric splines, are developed. Hussain and Saleem [4] introduced a C1 piecewise rational quadratic trigonometric polynomial spline which defines two shape parameters in each subinterval, and they extended the spline to piecewise rational biquadratic function with four shape parameters in each rectangular patch. Ibraheem et al. [5] constructed a C1 piecewise rational cubic trigonometric function with four shape parameters. The authors used some simple data-dependent constraints on shape parameters to preserve the positivity and smoothness of the obtained spline. By using Coons patch type method, they also gave a kind of rational bicubic trigonometric functions which can be used to visualize the positive surface data over a rectangular grid. Hussain el al. [6] discussed some problems about shape preserving trigonometric functions. The authors developed a control point form of quadratic trigonometric function which obeys many properties of the cubic Bézier curve. Bashir and Ali [7] constructed a C1 piecewise rational quadratic trigonometric function with four shape parameters. By using the spline, positive, monotone, and constrained curve interpolating schemes are developed. Zhu and Han [8] presented a rational quartic spline with two parameters for creating a C2 shape preserving interpolation curve.The work in this paper is inspired by Bashir and Ali [7] and Sarfraz et al. [9]. The aim is to develop a quadratic rational trigonometric interpolating spline with local control on a single interval and C1 continuity by using a quadratic trigonometric Bernstein basis given in [2]. There are four positive shape parameters in the description of the interpolating scheme. The constrains on the shape parameters are derived so as to obtain a shape preserving C1 piecewise rational quadratic trigonometric interpolation spline for positive, monotone, and constrained data. Two of these parameters are constrained by simple data-dependent conditions to preserve the inherited shape feature of the data while the other two are kept free to modify the shape of the generated curve. The scheme is useful for both equally and unequally spaced data. The trigonometric Bernstein basis is selected different from [5, 7, 10], which can generate more fairness curves while the shape preserving interpolant has a simpler expression. In particular, from the numeric experiments, we found that the conditions of the shape parameters for generating a monotonicity preserving interpolation curve in [7] cannot work well with the data in this paper. A set of new valid conditions for the shape parameters are derived, and the deduction is provided in the appendix.The remainder of the paper is organized as follows. Section2 presents a new C1 piecewise rational quadratic trigonometric spline with four shape parameters in each subinterval and the methods to visualize positive, monotone, and constrained data. Section 3 discusses the error of approximation. Finally, Section 4 concludes the paper.


## 2.C1 Shape Preserving Rational Quadratic Trigonometric Interpolation Spline

### 2.1. Total Positivity of the Quadratic Trigonometric Bernstein Basis

A kind of quadratic trigonometric Bernstein basis constructed in [2] is used here:(1)B0u=1-sinu,B1u=sinu1-sinu,B2u=cos⁡u1-cos⁡u,B3u=1-cos⁡u,where u∈[0,π/2]. It was proved by Wu et al. [2] that basis (1) has the important properties of partition of unity and nonnegativity, which implies that the corresponding trigonometric Bézier curves defined by the basis have the properties of affine invariance and convex hull. Comparing with the bases in [5, 7, 10], basis (1) has less computational cost benefiting to the efficient function evaluation.In curve design, total positivity of basis is the most important property, which leads to many shape preserving properties [11]. For instance, the length, number of inflections, and angular variation of the curve defined by normalized totally positive basis are bounded above by those of the control polygon. Here, we want to highlight that basis (1) also has the vital property of total positivity.We can rewrite basis (1) as follows:(2)B0u,B1u,B2u,B3u=A0(u),A1(u),A2(u),A3(u)T,where(3)A0u=1-sinu2,A1u=2sinu1-sinu,A2u=2cos⁡u1-cos⁡u,A3u=1-cos⁡u2,T=10001212000012120001.In [3], it has been proved that the basis {A0(u),A1(u),A2(u),A3(u)} is an optimal normalized totally positive basis on [0,π/2]. Obviously, matrix T is a nonsingular stochastic and totally positive matrix. Taking these together, by Theorem 4.2 of [12], we can immediately conclude that basis (1) is totally positive, which implies that the curve defined by basis (1) has the property of variation diminishing. This makes basis (1) be suited for curve design.


### 2.2.C1 Rational Quadratic Trigonometric Spline

In this subsection, aC1 piecewise rational quadratic trigonometric spline with four parameters is developed based on basis (1).Let{(ti,fi):i=0,1,2,…,n} be the given set of data points defined over the interval [a,b], where a=t0<t1<t2<⋯<tn=b. The piecewise quadratic trigonometric function is defined as(4)Pt=Piu=∑j=03‍ξjBju∑j=03‍wijBju,∀t∈[ti,ti+1],where Bj(u), j=0,1,2,3, are the basis functions defined in (1),  hi=ti+1-ti, δ=(t-ti)/hi, u=πδ/2, and the parameters wi0, wi1, wi2, and wi3 are the local tension parameters or tension parameters in each subinterval [ti,ti+1], i=0,1,…,n-1.The rational quadratic trigonometric function (4) is transformed to a C1 continuous interpolation spline by applying the following C1-continuity conditions at the end point of each interval [ti,ti+1]:(5)P(ti)=fi,P(ti+1)=fi+1,P′(ti)=di,P′(ti+1)=di+1,where P′(t) denotes derivative with respect to t and di is derivative value at knot ti. In most cases, these dis are not given directly and must be computed either from the given data {(ti,fi):i=0,1,2,…,n} or by some numerical methods [13], such as arithmetic mean method and geometric mean method. Different method would be adopted according to the given data. In this paper, we use the arithmetic mean method to compute dis for the data in Table 1 and the geometric mean method for other data.Table 1
A 2D positive dataset.
i
1
2
3
4
5
6
7
8
t
i
0
0.04
0.05
0.06
0.07
0.08
0.12
0.13
f
i
0.82
1.2
0.978
0.6
0.3
0.1
0.15
0.48From conditions (5), the values of ξj, j=0,1,2,3, can be calculated as(6)ξ0=wi0fi,ξ1=πwi1fi+2hiwi0diπ,ξ2=πwi2fi+1-2hiwi3di+1π,ξ3=wi3fi+1.Substitute (6) into (4); we have(7)P(t)=Pi(t)=pi(u)qi(u),where(8)piu=wi0fiB0+πwi1fi+2hiwi0diπB1+(πwi2fi+1-2hiwi3di+1π)B2+wi3fi+1B3,qi(u)=wi0B0+wi1B1+wi2B2+wi3B3.


### 2.3. Positive Curve Interpolation

Preserving positivity is the essence of data visualization in many study fields. There are many physical situations where the entities only have meanings when their values are positive. Therefore, this section aims at developing constrains on the shape parameters in the description of rational trigonometric function so that the resultant curve is positive for a positive data set.Theorem 1.
For a positive data set{(ti,fi):i=0,1,2,…,n}, a C1 piecewise rational quadratic trigonometric spline defined in (7) preserves positivity if the following conditions are fulfilled:(9)wi0>0,wi3>0,wi1>max⁡0,-2dihiwi0πfi,wi2>max⁡0,2di+1hiwi3πfi+1.Proof.
Considering the data set{(ti,fi):i=0,1,2,…,n} where ti<ti+1, fi>0, i=0,1,…,n-1, the spline defined in (7) preserves positivity if Pi(t)>0 for all t in [ti,ti+1].
It is apparent thatwij>0, j=0,1,2,3, are sufficient to ensure qi(u)>0. Thus, the positivity of Pi(t)=pi(u)/qi(u) depends on the positivity of the trigonometric quadratic polynomial pi(u) only. Obviously, pi(u)>0 if all the coefficients are positive. Thus, from (8), we can immediately obtain the following constrains:(10)wi1>-2dihiwi0πfi,wi2>2di+1hiwi3πfi+1.
These imply the theorem.The above developed scheme is used to make the constructed curve preserve the positivity of data. The curves in Figures1(a) and 1(b) are drawn by using C1 piecewise rational quadratic trigonometric spline for 2D positive data sets given in Tables 1 and 2, respectively. Random values are assigned to the shape parameters and it is clear that the resulting curves do not preserve the positivity. The positivity preserving curves in Figures 2 and 3 are generated from the same data set. The first four results in Figures 2 and 3 are the curves generated by methods [4–7] with a set of appropriate parameters, and the last curves are generated by our scheme. From the results, it can be seen that our C1 piecewise rational quadratic trigonometric spline describes the positive data set more fairly than [4–7]. The curves are displayed by sampling them into 1,001 points. The computational times for the curves with different methods are listed in Table 3. From the table, it is easy to find that our method is the fastest one to generate a positive preserving curve.Table 2
A 2D positive dataset.
i
1
2
3
4
5
6
7
8
9
10
t
i
0
3.25
15
26.5
30
32
37
40
42.5
44
f
i
8.8
3
0.025
3.1
6.2
9.6
20
22.5
21.519
20Table 3
The function evaluating costs for different methods.
Figure
Time(s)
[4]
[5]
[6]
[7]
Our method
Figure2
0.0560
0.0640
0.0430
0.0770
0.0400
Figure3
0.0470
0.0670
0.0440
0.0480
0.0410Figure 1
Nonpositivity rational quadratic trigonometric curves by our method with random parameters.
(a)
w
i
0
=
0.5, wi1=0.5,  wi2=0.5,  wi3=0.5
(b)
w
i
0
=
1,  wi1=0.5,  wi2=0.5,  wi3=1Figure 2
C
1 positivity preserving curves generated by different methods from the points in Table 1, such as (a) method [4], (b) method [5], (c) method [6], (d) method [7], and (e) our method. Their corresponding parameters for all segments are set as (μi=4.1, ηi=4.5), (wi0=0.2, wi1=0.5, wi2=0.6, wi3=0.3), (αi=4, βi=5), (wi0=0.2, wi1=0.8, wi2=0.87, wi3=0.3), and (wi0=0.2, wi1=0.8, wi2=0.87, wi3=0.3), respectively.
(a)
(b)
(c)
(d)
(e)Figure 3
C
1 positivity preserving curves generated by different methods from the points in Table 2, such as (a) method [4], (b) method [5], (c) method [6], (d) method [7], and (e) our method. Their corresponding parameters for all segments are set as (μi=3.6, ηi=2.9), (wi0=1.3, wi1=4.5, wi2=4.8, wi3=1.5), (αi=3.8, βi=3), (wi0=1.3, wi1=2.5, wi2=2.5, wi3=1.5), and (wi0=1.3, wi1=4, wi2=4, wi3=1.5), respectively.
(a)
(b)
(c)
(d)
(e)


### 2.4. Constrained Curve Interpolation

We generalize the positive curve interpolation method. It is assumed that the data under consideration lies not only above the liney=0 but also above any arbitrary line y=mx+c. Positivity preserving interpolation is one special case of constrained interpolation. We wish to develop a scheme for generating a curve which interpolates these data and lies above the given line as well.Theorem 2.
TheC1 piecewise rational quadratic trigonometric spline defined in (7) preserves the shape of data {(ti,fi):i=0,1,2,…,n} lying above an arbitrary straight line in each subinterval [ti,ti+1], i=0,1,2,…,n-1, if the following conditions are satisfied:(11)wi0>0,wi3>0,wi1>max⁡0,-2dihiwi0π(fi-l),wi2>max⁡0,2di+1hiwi3π(fi+1-l),where l=αi(1-(2/π)u)-(2/π)uβi with αi=mti+c and βi=mti+1+c.Proof.
Let{(ti,fi):i=0,1,2,…,n} be a set of data points lying above a given straight line y=mx+c; that is,(12)fi>mti+c.The curve will lie above the straight line if the rational quadratic trigonometric spline (7) satisfies the following condition:(13)Pt>mt+c,∀t∈[t0,tn].For each subinterval [ti,ti+1], (13) can be expressed as(14)Pi(t)=piuqiu>αi1-2πu-2πuβi,or(15)pi(u)-lqi(u)>0.Using pi(u) and qi(u) as defined in (8), the expression (14) can be rewritten in a simplified form as(16)∑j=03‍ξiBj-l∑j=03‍wijBj>0.According to (6), we get(17)∑j=03‍BjGj>0,where(18)G0=(fi-l)wi0,G1=πwi1fi+2hidiwi0π-lwi1,G2=πwi2fi+1-2hidi+1wi3π-lwi2,G3=(fi+1-l)wi3.Since Bj≥0, j=0,1,2,3, (17) is true if Gj>0, as wi0>0 and wi3>0 can lead to G0,G3>0, and G1>0 if(19)wi1>-2dihiwi0π(fi-l),and G2>0 if(20)wi2>2di+1hiwi3π(fi+1-l).
These prove the desired result.The method is demonstrated with producing constrained curves from the data in Tables4 and 5. The data in Table 4 lies above line y=0.06x+0.02, whereas the data given in Table 5 lies above the line y=0.05x+0.23. Figures 4(a) and 5(a) are produced by taking the random values of the shape parameters in our method. The generated curves do not lie above the respective given straight lines. Figures 4(b) and 5(b) show the curve created by method [7] with a set of appropriate parameters, and the curves in Figures 4(c) and 5(c) are created by our constrained curve scheme developed. It is clearly shown that when selecting proper parameters, the curves not only lie above their same reference lines but also can be made smooth enough.Table 4
A 2D dataset lying above the liney=0.06x+0.02.
i
1
2
3
4
5
t
i
0
1.1
2
3
4.5
f
i
1.5
0.4
4
6.2
6Table 5
A 2D dataset lying above the liney=0.05x+0.23.
i
1
2
3
4
5
6
7
8
9
t
i
0
0.3
0.5
1
1.5
2
2.5
3.05
4
f
i
2
0.6
0.33
0.35
1
0.5
1.1
0.45
0.6Figure 4
Constrained curves constructed by different methods from the data in Table4. (a) Our method with random parameters (wi0=0.5, wi1=0.2, wi2=0.2, wi3=1). (b) Method [7] with setting parameters as (wi0=0.5, wi1=0.6, wi2=0.8, wi3=0.5). (c) Our method with parameters (wi0=0.5, wi1=0.8, wi2=0.8, wi3=0.5).
(a)
(b)
(c)Figure 5
Constrained curves constructed by different methods from the data in Table5. (a) Our method with random parameters (wi0=1, wi1=0.5, wi2=0.5, wi3=1). (b) Method [7] with setting parameters as (wi0=0.8, wi1=1.7, wi2=1.8, wi3=0.9). (c) Our method with parameters (wi0=0.8, wi1=2, wi2=2, wi3=0.9).
(a)
(b)
(c)


### 2.5. Monotone Curve Interpolation

Considering a data set{(ti,fi):i=0,1,2,…,n} which is monotonically increasing (fi≤fi+1) or decreasing (fi≥fi+1), the schemes mentioned before cannot construct a monotonicity preserving interpolation curve. This subsection discusses a scheme with four parameters to generate a piecewise quadratic trigonometric curve that interpolates the data points and preserves monotonicity as well. The monotone curve would be achieved by constraining four local shape parameters, where two parameters are for the monotony-preserving constraints while the other two parameters would be kept free for shape control to enhance the monotone curve further.Theorem 3.
TheC1 piecewise rational quadratic trigonometric spline defined in (7) preserves the monotonicity through monotone data {(ti,fi):i=0,1,2,…,n} in each subinterval [ti,ti+1], i=0,1,2,…,n-1, if the shape parameters satisfy the following conditions:(21)wi0>0,wi3>0,wi1>4diwi0πΔi,wi2>4di+1wi3πΔi.Proof.
Let{(ti,fi):i=0,1,2,…,n} be a monotonically increasing data set; that is,(22)fi≤fi+1,Δi=fi+1-fihi≥0,di≥0,i=0,1,2,…,n.The case of monotonically decreasing data set can be dealt with in a similar fashion. The following two cases for interpolant (7) arise to preserve the monotonicity of monotone data.
Case 1. One has di=di+1=0 when Δi=0. In this case, Pi(t) reduces to(23)Pit=fi,∀t∈[ti,ti+1].Case 2. When Δi>0, Pi(t) is monotonically increasing if and only if(24)Pi′t>0,∀t∈ti,ti+1,where(25)Pi′t=π2hiqiu2×C1cos⁡u1-sinu2+C2cos⁡u1+sin2u+C3cos⁡u+2C4cos⁡usinu+C5sinu+C6sinu1+cos⁡2u+C7sinu1-cos⁡u2+C8with(26)C1=(wi1-wi0)wi2Δi+2di+1wi3π(wi0-wi1)-2diwi0wi2π,C2=2diwi02π,C3=(wi0-wi1)wi3Δi+2diwi0wi3π,C4=wi1wi2Δi-2diwi0π(wi0+wi2)-2di+1wi3π(wi3+wi1),C5=wi3-wi2wi0Δi+2di+1wi0wi3π,C6=2di+1wi32π,C7=(wi2-wi3)wi1Δi+2diwi0π(wi3-wi2)-2di+1wi1wi3π,C8=wi0-wi1wi2-wi3Δi+2diwi0πwi2-wi3+2di+1wi3π(wi1-wi0).The denominator of (25) is always positive. Thus, the sufficient condition for monotonicity preserving curve is(27)Mu=C1cos⁡u1-sinu2+C2cos⁡u(1+sin2u)+C3cos⁡u+2C4cos⁡usinu+C5sinu+C6sinu(1+cos⁡2u)+C7sinu1-cos⁡u2+C8≥0.To ensure (27) is positive, we use the universal formula(28)cos⁡u=1-λ21+λ2,sinu=2λ1+λ2to rewrite M(u) as(29)mλ=11+λ23×K11-λ6+K21-λ5λ+K31-λ4λ2+K41-λ3λ3+K51-λ2λ4+K61-λ1λ5+K7λ6,where(30)K1=R1,K2=2(R1+R2+R3),K3=8R2+8R3+2R4+2R5,K4=8R2+16R3+8R4+8R5,K5=4R2+16R3+16R4+4R5,K6=8(R3+R4+R6),K7=8R6,R1=C1+C2+C3+C8=2diwi02π,R2=C2+C3+C4+C6+C8=wi0Δiwi2-2di+1wi3πΔi,R3=C2+C3+C4+C5+C6+C8=wi0wi3Δi,R4=C2+C4+C5+C6+C8=wi3Δiwi1-2diwi0πΔi,R5=C2+C4+C6=12wi1Δiwi2-4di+1wi3πΔillllllllll+wi2Δiwi1-4diwi0(πΔi),R6=C5+C6+C7+C8=2di+1wi32π.If conditions (21) hold, we have Ri>0, i=1,2,…,6. Then Ki>0, i=1,2,…,7, m(λ)>0, and hence Pi′(t)>0. As a conclusion, interpolant (7) preserves the monotonicity through monotone data under conditions (21).To demonstrate the developed scheme, we construct monotonicity preserving curves from two monotone data sets given in Tables6 and 7 and compare our method with methods [6, 7, 10]. Figures 6(a) and 6(b) show the curves generated by our method with assigning random values to the four shape parameters, which are not monotone.Table 6
A 2D monotone dataset.
i
1
2
3
4
5
6
7
8
9
10
11
t
i
1
4
6.5
7
11
15
20
25
40
44
45
f
i
1
1
2
3.5
5.5
5.5
10
10
12.5
18
20Table 7
A 2D monotone dataset.
i
1
2
3
4
5
6
7
8
9
10
11
t
i
0
2
3
5
6
8
9
11
12
14
15
f
i
10
10
10
10
10
10
10.5
15
50
60
80Figure 6
Nonmonotone curves from monotone data sets in Tables6 and 7 using our method with random shape parameters.
(a)
w
i
0
=
0.7
,
w
i
1
=
0.5
,
w
i
2
=
0.5
,
w
i
3
=
0.8
(b)
w
i
0
=
1
,
w
i
1
=
0.5
,
w
i
2
=
0.5
,
w
i
3
=
1Remark 4.
In [7], the authors proved a group of conditions for shape parameters to generate monotonicity preserving curves from monotone data,(31)wi0>0,wi3>0,max⁡0,wi0,diwi0πΔi<wi1<1+diπΔiwi0,max⁡0,wi3,di+1wi3πΔi<wi2<1+di+1πΔiwi3.However, from our experiments, the generated curves are not monotone when the shape parameters are set according to the conditions; see Figure 7. We apply constraints (31) to the data in Table 6 and set wi0=wi3=0.3; then the values of bounds of wi1 and wi2 are computed as shown in Table 8. We choose wi1 and wi2 with the values which are a little larger than their left bounds, a little less than their right bounds, and the middle point of their intervals, respectively. There are three curves constructed from the same data in Table 6, as shown in Figure 7(a). It is easy to observe that three curves are not monotone and tend to be monotone as wi1 and wi2 increase. Similar results displayed in Figure 7(b) are generated when we set wi0=wi3=2.0, wi1, and wi2 as the values in Table 9. These conclude that constraints (31) cannot work correctly for generating a monotonicity preserving curve with the data in Table 6.
In order to solve the above problem, we derive the new constraints for method [7] with a similar deduction in this paper,(32)wi0>0,wi3>0,wi1>2diwi0πΔi,wi2>2di+1wi3πΔi.The details can be seen in the appendix. With the same values of wi0 and wi3 as before, wi0=wi3=0.3 or wi0=wi3=2.0, we set wi1=0.8, wi2=0.9 or wi1=4.0, wi2=4.0 which meet conditions (32), i=1,…,10. With these parameters, monotonicity preserving curves can be constructed using method [7] and are shown in Figures 8(a) and 8(b). Setting a group of appropriate parameters, the curves generated by method [10], our method, and method [6] are also shown in Figures 8(c), 8(d), 8(e), 8(f), 8(g), and 8(h). From Figure 8, it is not difficult to find that method [7] with new conditions (32) and our method can generate similar fairness monotonicity preserving curves while the curves generated by methods [6, 10] have extra inflections.
Figures9 and 10 show another example whose data are from Table 7. Tables 10 and 11 give the values of parameters wi1 and wi2 under constraints (31) when setting  wi0=wi3=0.3 or wi0=wi3=3.0. Six corresponding curves constructed by method [7] are displayed in Figure 9. In Figure 10, the curves generated by method [7] with new constraints (32), method [10], our method, and method [6] are shown.
We also compare our method with other three methods [6, 7, 10] on the computational time by creating the curves from the data in Tables 6 and 7. The function evaluating times are listed in Table 12. From this table, compared to other methods, our method takes the least time to generate a monotone curve.Table 8
The values of shape parameters for curves in Figure7(a).
i
1
2
3
4
5
6
7
8
9
10
w
i
1
max
⁡
0
,
w
i
0
,
d
i
w
i
0
/
(
π
Δ
i
)
⁡
0.30
0.30
0.30
0.35
0.30
0.30
0.30
0.30
0.30
0.30
Midpoint
0.30
0.30
0.33
0.50
0.30
0.30
0.30
0.30
0.37
0.35
1
+
d
i
/
(
π
Δ
i
)
w
i
0
0.30
0.30
0.36
0.65
0.30
0.30
0.30
0.30
0.43
0.39
w
i
2
max
⁡
0
,
w
i
3
,
d
i
w
i
+
1
3
/
(
π
Δ
i
)
0.30
0.44
0.30
0.30
0.30
0.30
0.30
1.06
0.30
0.30
Midpoint
0.30
0.59
0.33
0.30
0.30
0.30
0.30
1.21
0.37
0.33
1
+
d
i
+
1
/
(
π
Δ
i
)
w
i
3
0.30
0.74
0.36
0.30
0.30
0.30
0.30
1.36
0.43
0.36Table 9
The values of shape parameters for curves in Figure7(b).
i
1
2
3
4
5
6
7
8
9
10
w
i
1
max
⁡
0
,
w
i
0
,
d
i
w
i
0
/
(
π
Δ
i
)
2.00
2.00
2.00
2.36
2.00
2.00
2.00
2.00
2.00
2.00
Midpoint
2.00
2.00
2.20
3.36
2.00
2.00
2.00
2.00
2.43
2.30
1
+
d
i
/
(
π
Δ
i
)
w
i
0
2.00
2.00
2.39
4.36
2.00
2.00
2.00
2.00
2.86
2.59
w
i
2
max
⁡
0
,
w
i
3
,
d
i
w
i
+
1
3
/
(
π
Δ
i
)
2.00
3.00
2.00
2.00
2.00
2.00
2.00
7.09
2.00
2.00
Midpoint
2.00
3.98
2.20
2.00
2.00
2.00
2.00
8.09
2.43
2.20
1
+
d
i
+
1
/
(
π
Δ
i
)
w
i
3
2.00
4.95
2.40
2.00
2.00
2.00
2.00
9.09
2.86
2.41Table 10
The values of shape parameters for curves in Figure9(a).
i
1
2
3
4
5
6
7
8
9
10
w
i
1
max
⁡
0
,
w
i
0
,
d
i
w
i
0
/
(
π
Δ
i
)
0.30
0.30
0.30
0.30
0.30
0.30
0.53
0.30
0.30
0.30
Midpoint
0.30
0.30
0.30
0.30
0.30
0.30
0.68
0.32
0.42
0.33
1
+
d
i
/
(
π
Δ
i
)
w
i
0
0.30
0.30
0.30
0.30
0.30
0.30
0.83
0.33
0.54
0.36
w
i
2
max
⁡
0
,
w
i
3
,
d
i
w
i
+
1
3
/
(
π
Δ
i
)
0.30
0.30
0.30
0.30
0.30
2.40
0.53
0.30
0.30
0.30
Midpoint
0.30
0.30
0.30
0.30
0.30
2.56
0.68
0.32
0.42
0.32
1
+
d
i
+
1
/
(
π
Δ
i
)
w
i
3
0.30
0.30
0.30
0.30
0.30
2.71
0.83
0.33
0.54
0.33Table 11
The values of shape parameters for curves in Figure9(b).
i
1
2
3
4
5
6
7
8
9
10
w
i
1
max
⁡
0
,
w
i
0
,
d
i
w
i
0
/
(
π
Δ
i
)
3.00
3.00
3.00
3.00
3.00
3.00
5.53
3.00
3.00
3.00
Midpoint
3.00
3.00
3.00
3.00
3.00
3.00
6.85
3.17
4.21
3.30
1
+
d
i
/
(
π
Δ
i
)
w
i
0
3.00
3.00
3.00
3.00
3.00
3.00
8.35
3.34
5.41
3.60
w
i
2
max
⁡
0
,
w
i
3
,
d
i
w
i
+
1
3
/
(
π
Δ
i
)
3.00
3.00
3.00
3.00
3.00
24.06
5.35
3.00
3.00
3.00
Midpoint
3.00
3.00
3.00
3.00
3.00
25.56
6.85
3.17
4.20
3.15
1
+
d
i
+
1
/
(
π
Δ
i
)
w
i
3
3.00
3.00
3.00
3.00
3.00
27.06
8.35
3.34
5.41
3.30Table 12
The time statistics for different methods.
Figure
Time(s)
[6]
[7]
[10]
Our method
Figure8
0.0490
0.0540
0.0690
0.0500
Figure10
0.0420
0.0450
0.0470
0.0380Figure 7
The curves generated by method [7] with constraints (31). (a) and (b) show the curves which are constructed by using the parameters in Tables 8 and 9.
(a)
(b)Figure 8
Comparisons of the monotonicity preserving curves constructed by method [7] with new constraints (32), method [10], and our method with different setting of the parameters wi0 and wi3 and method [6] with different parameters αi and βi. (a) and (b) are for method [7] with parameters (wi0=0.3,wi1=0.8,wi2=0.9,wi3=0.3) and (wi0=2,wi1=4,wi2=4,wi3=2). (c) and (d) are generated from method [10] with parameters (wi0=0.3,wi1=8,wi2=9,wi3=0.3) and (wi0=2,wi1=42,wi2=45,wi3=2). (e) and (f) are from our method with parameters (wi0=0.3,wi1=0.7,wi2=1.1,wi3=0.3) and (wi0=2,wi1=3,wi2=4,wi3=2). (g) and (h) are constructed by method [6] with parameters (αi=2.9,βi=3) and (αi=15,βi=16).
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)Figure 9
The curves generated by method [7] with constraints (31). (a) The parameters in Table 10. (b) The parameters in Table 11.
(a)
(b)Figure 10
Comparisons of the monotonicity preserving curves constructed by ((a) and (b)) method [7] with new constraints (32), ((c) and (d)) method [10], ((e) and (f)) our method, with different setting of the parameters wi0 and wi3, and ((g) and (h)) method [6] with different parameters αi and βi. The parameters are set as (a) (wi0=0.3,wi1=1.2,wi2=1.5,wi3=0.3), (b) (wi0=3,wi1=10,wi2=15,wi3=3), (c) (wi0=0.3,wi1=8,wi2=9,wi3=0.3), (d) (wi0=3,wi1=80,wi2=90,wi3=3), (e) (wi0=0.3,wi1=0.7,wi2=1.1,wi3=0.3), (f) (wi0=3,wi1=7,wi2=9,wi3=3), (g) (αi=3.5,βi=3.5), and (h) (αi=25,βi=26).
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)


## 2.1. Total Positivity of the Quadratic Trigonometric Bernstein Basis

A kind of quadratic trigonometric Bernstein basis constructed in [2] is used here:(1)B0u=1-sinu,B1u=sinu1-sinu,B2u=cos⁡u1-cos⁡u,B3u=1-cos⁡u,where u∈[0,π/2]. It was proved by Wu et al. [2] that basis (1) has the important properties of partition of unity and nonnegativity, which implies that the corresponding trigonometric Bézier curves defined by the basis have the properties of affine invariance and convex hull. Comparing with the bases in [5, 7, 10], basis (1) has less computational cost benefiting to the efficient function evaluation.In curve design, total positivity of basis is the most important property, which leads to many shape preserving properties [11]. For instance, the length, number of inflections, and angular variation of the curve defined by normalized totally positive basis are bounded above by those of the control polygon. Here, we want to highlight that basis (1) also has the vital property of total positivity.We can rewrite basis (1) as follows:(2)B0u,B1u,B2u,B3u=A0(u),A1(u),A2(u),A3(u)T,where(3)A0u=1-sinu2,A1u=2sinu1-sinu,A2u=2cos⁡u1-cos⁡u,A3u=1-cos⁡u2,T=10001212000012120001.In [3], it has been proved that the basis {A0(u),A1(u),A2(u),A3(u)} is an optimal normalized totally positive basis on [0,π/2]. Obviously, matrix T is a nonsingular stochastic and totally positive matrix. Taking these together, by Theorem 4.2 of [12], we can immediately conclude that basis (1) is totally positive, which implies that the curve defined by basis (1) has the property of variation diminishing. This makes basis (1) be suited for curve design.


## 2.2.C1 Rational Quadratic Trigonometric Spline

In this subsection, aC1 piecewise rational quadratic trigonometric spline with four parameters is developed based on basis (1).Let{(ti,fi):i=0,1,2,…,n} be the given set of data points defined over the interval [a,b], where a=t0<t1<t2<⋯<tn=b. The piecewise quadratic trigonometric function is defined as(4)Pt=Piu=∑j=03‍ξjBju∑j=03‍wijBju,∀t∈[ti,ti+1],where Bj(u), j=0,1,2,3, are the basis functions defined in (1),  hi=ti+1-ti, δ=(t-ti)/hi, u=πδ/2, and the parameters wi0, wi1, wi2, and wi3 are the local tension parameters or tension parameters in each subinterval [ti,ti+1], i=0,1,…,n-1.The rational quadratic trigonometric function (4) is transformed to a C1 continuous interpolation spline by applying the following C1-continuity conditions at the end point of each interval [ti,ti+1]:(5)P(ti)=fi,P(ti+1)=fi+1,P′(ti)=di,P′(ti+1)=di+1,where P′(t) denotes derivative with respect to t and di is derivative value at knot ti. In most cases, these dis are not given directly and must be computed either from the given data {(ti,fi):i=0,1,2,…,n} or by some numerical methods [13], such as arithmetic mean method and geometric mean method. Different method would be adopted according to the given data. In this paper, we use the arithmetic mean method to compute dis for the data in Table 1 and the geometric mean method for other data.Table 1
A 2D positive dataset.
i
1
2
3
4
5
6
7
8
t
i
0
0.04
0.05
0.06
0.07
0.08
0.12
0.13
f
i
0.82
1.2
0.978
0.6
0.3
0.1
0.15
0.48From conditions (5), the values of ξj, j=0,1,2,3, can be calculated as(6)ξ0=wi0fi,ξ1=πwi1fi+2hiwi0diπ,ξ2=πwi2fi+1-2hiwi3di+1π,ξ3=wi3fi+1.Substitute (6) into (4); we have(7)P(t)=Pi(t)=pi(u)qi(u),where(8)piu=wi0fiB0+πwi1fi+2hiwi0diπB1+(πwi2fi+1-2hiwi3di+1π)B2+wi3fi+1B3,qi(u)=wi0B0+wi1B1+wi2B2+wi3B3.


## 2.3. Positive Curve Interpolation

Preserving positivity is the essence of data visualization in many study fields. There are many physical situations where the entities only have meanings when their values are positive. Therefore, this section aims at developing constrains on the shape parameters in the description of rational trigonometric function so that the resultant curve is positive for a positive data set.Theorem 1.
For a positive data set{(ti,fi):i=0,1,2,…,n}, a C1 piecewise rational quadratic trigonometric spline defined in (7) preserves positivity if the following conditions are fulfilled:(9)wi0>0,wi3>0,wi1>max⁡0,-2dihiwi0πfi,wi2>max⁡0,2di+1hiwi3πfi+1.Proof.
Considering the data set{(ti,fi):i=0,1,2,…,n} where ti<ti+1, fi>0, i=0,1,…,n-1, the spline defined in (7) preserves positivity if Pi(t)>0 for all t in [ti,ti+1].
It is apparent thatwij>0, j=0,1,2,3, are sufficient to ensure qi(u)>0. Thus, the positivity of Pi(t)=pi(u)/qi(u) depends on the positivity of the trigonometric quadratic polynomial pi(u) only. Obviously, pi(u)>0 if all the coefficients are positive. Thus, from (8), we can immediately obtain the following constrains:(10)wi1>-2dihiwi0πfi,wi2>2di+1hiwi3πfi+1.
These imply the theorem.The above developed scheme is used to make the constructed curve preserve the positivity of data. The curves in Figures1(a) and 1(b) are drawn by using C1 piecewise rational quadratic trigonometric spline for 2D positive data sets given in Tables 1 and 2, respectively. Random values are assigned to the shape parameters and it is clear that the resulting curves do not preserve the positivity. The positivity preserving curves in Figures 2 and 3 are generated from the same data set. The first four results in Figures 2 and 3 are the curves generated by methods [4–7] with a set of appropriate parameters, and the last curves are generated by our scheme. From the results, it can be seen that our C1 piecewise rational quadratic trigonometric spline describes the positive data set more fairly than [4–7]. The curves are displayed by sampling them into 1,001 points. The computational times for the curves with different methods are listed in Table 3. From the table, it is easy to find that our method is the fastest one to generate a positive preserving curve.Table 2
A 2D positive dataset.
i
1
2
3
4
5
6
7
8
9
10
t
i
0
3.25
15
26.5
30
32
37
40
42.5
44
f
i
8.8
3
0.025
3.1
6.2
9.6
20
22.5
21.519
20Table 3
The function evaluating costs for different methods.
Figure
Time(s)
[4]
[5]
[6]
[7]
Our method
Figure2
0.0560
0.0640
0.0430
0.0770
0.0400
Figure3
0.0470
0.0670
0.0440
0.0480
0.0410Figure 1
Nonpositivity rational quadratic trigonometric curves by our method with random parameters.
(a)
w
i
0
=
0.5, wi1=0.5,  wi2=0.5,  wi3=0.5
(b)
w
i
0
=
1,  wi1=0.5,  wi2=0.5,  wi3=1Figure 2
C
1 positivity preserving curves generated by different methods from the points in Table 1, such as (a) method [4], (b) method [5], (c) method [6], (d) method [7], and (e) our method. Their corresponding parameters for all segments are set as (μi=4.1, ηi=4.5), (wi0=0.2, wi1=0.5, wi2=0.6, wi3=0.3), (αi=4, βi=5), (wi0=0.2, wi1=0.8, wi2=0.87, wi3=0.3), and (wi0=0.2, wi1=0.8, wi2=0.87, wi3=0.3), respectively.
(a)
(b)
(c)
(d)
(e)Figure 3
C
1 positivity preserving curves generated by different methods from the points in Table 2, such as (a) method [4], (b) method [5], (c) method [6], (d) method [7], and (e) our method. Their corresponding parameters for all segments are set as (μi=3.6, ηi=2.9), (wi0=1.3, wi1=4.5, wi2=4.8, wi3=1.5), (αi=3.8, βi=3), (wi0=1.3, wi1=2.5, wi2=2.5, wi3=1.5), and (wi0=1.3, wi1=4, wi2=4, wi3=1.5), respectively.
(a)
(b)
(c)
(d)
(e)


## 2.4. Constrained Curve Interpolation

We generalize the positive curve interpolation method. It is assumed that the data under consideration lies not only above the liney=0 but also above any arbitrary line y=mx+c. Positivity preserving interpolation is one special case of constrained interpolation. We wish to develop a scheme for generating a curve which interpolates these data and lies above the given line as well.Theorem 2.
TheC1 piecewise rational quadratic trigonometric spline defined in (7) preserves the shape of data {(ti,fi):i=0,1,2,…,n} lying above an arbitrary straight line in each subinterval [ti,ti+1], i=0,1,2,…,n-1, if the following conditions are satisfied:(11)wi0>0,wi3>0,wi1>max⁡0,-2dihiwi0π(fi-l),wi2>max⁡0,2di+1hiwi3π(fi+1-l),where l=αi(1-(2/π)u)-(2/π)uβi with αi=mti+c and βi=mti+1+c.Proof.
Let{(ti,fi):i=0,1,2,…,n} be a set of data points lying above a given straight line y=mx+c; that is,(12)fi>mti+c.The curve will lie above the straight line if the rational quadratic trigonometric spline (7) satisfies the following condition:(13)Pt>mt+c,∀t∈[t0,tn].For each subinterval [ti,ti+1], (13) can be expressed as(14)Pi(t)=piuqiu>αi1-2πu-2πuβi,or(15)pi(u)-lqi(u)>0.Using pi(u) and qi(u) as defined in (8), the expression (14) can be rewritten in a simplified form as(16)∑j=03‍ξiBj-l∑j=03‍wijBj>0.According to (6), we get(17)∑j=03‍BjGj>0,where(18)G0=(fi-l)wi0,G1=πwi1fi+2hidiwi0π-lwi1,G2=πwi2fi+1-2hidi+1wi3π-lwi2,G3=(fi+1-l)wi3.Since Bj≥0, j=0,1,2,3, (17) is true if Gj>0, as wi0>0 and wi3>0 can lead to G0,G3>0, and G1>0 if(19)wi1>-2dihiwi0π(fi-l),and G2>0 if(20)wi2>2di+1hiwi3π(fi+1-l).
These prove the desired result.The method is demonstrated with producing constrained curves from the data in Tables4 and 5. The data in Table 4 lies above line y=0.06x+0.02, whereas the data given in Table 5 lies above the line y=0.05x+0.23. Figures 4(a) and 5(a) are produced by taking the random values of the shape parameters in our method. The generated curves do not lie above the respective given straight lines. Figures 4(b) and 5(b) show the curve created by method [7] with a set of appropriate parameters, and the curves in Figures 4(c) and 5(c) are created by our constrained curve scheme developed. It is clearly shown that when selecting proper parameters, the curves not only lie above their same reference lines but also can be made smooth enough.Table 4
A 2D dataset lying above the liney=0.06x+0.02.
i
1
2
3
4
5
t
i
0
1.1
2
3
4.5
f
i
1.5
0.4
4
6.2
6Table 5
A 2D dataset lying above the liney=0.05x+0.23.
i
1
2
3
4
5
6
7
8
9
t
i
0
0.3
0.5
1
1.5
2
2.5
3.05
4
f
i
2
0.6
0.33
0.35
1
0.5
1.1
0.45
0.6Figure 4
Constrained curves constructed by different methods from the data in Table4. (a) Our method with random parameters (wi0=0.5, wi1=0.2, wi2=0.2, wi3=1). (b) Method [7] with setting parameters as (wi0=0.5, wi1=0.6, wi2=0.8, wi3=0.5). (c) Our method with parameters (wi0=0.5, wi1=0.8, wi2=0.8, wi3=0.5).
(a)
(b)
(c)Figure 5
Constrained curves constructed by different methods from the data in Table5. (a) Our method with random parameters (wi0=1, wi1=0.5, wi2=0.5, wi3=1). (b) Method [7] with setting parameters as (wi0=0.8, wi1=1.7, wi2=1.8, wi3=0.9). (c) Our method with parameters (wi0=0.8, wi1=2, wi2=2, wi3=0.9).
(a)
(b)
(c)


## 2.5. Monotone Curve Interpolation

Considering a data set{(ti,fi):i=0,1,2,…,n} which is monotonically increasing (fi≤fi+1) or decreasing (fi≥fi+1), the schemes mentioned before cannot construct a monotonicity preserving interpolation curve. This subsection discusses a scheme with four parameters to generate a piecewise quadratic trigonometric curve that interpolates the data points and preserves monotonicity as well. The monotone curve would be achieved by constraining four local shape parameters, where two parameters are for the monotony-preserving constraints while the other two parameters would be kept free for shape control to enhance the monotone curve further.Theorem 3.
TheC1 piecewise rational quadratic trigonometric spline defined in (7) preserves the monotonicity through monotone data {(ti,fi):i=0,1,2,…,n} in each subinterval [ti,ti+1], i=0,1,2,…,n-1, if the shape parameters satisfy the following conditions:(21)wi0>0,wi3>0,wi1>4diwi0πΔi,wi2>4di+1wi3πΔi.Proof.
Let{(ti,fi):i=0,1,2,…,n} be a monotonically increasing data set; that is,(22)fi≤fi+1,Δi=fi+1-fihi≥0,di≥0,i=0,1,2,…,n.The case of monotonically decreasing data set can be dealt with in a similar fashion. The following two cases for interpolant (7) arise to preserve the monotonicity of monotone data.
Case 1. One has di=di+1=0 when Δi=0. In this case, Pi(t) reduces to(23)Pit=fi,∀t∈[ti,ti+1].Case 2. When Δi>0, Pi(t) is monotonically increasing if and only if(24)Pi′t>0,∀t∈ti,ti+1,where(25)Pi′t=π2hiqiu2×C1cos⁡u1-sinu2+C2cos⁡u1+sin2u+C3cos⁡u+2C4cos⁡usinu+C5sinu+C6sinu1+cos⁡2u+C7sinu1-cos⁡u2+C8with(26)C1=(wi1-wi0)wi2Δi+2di+1wi3π(wi0-wi1)-2diwi0wi2π,C2=2diwi02π,C3=(wi0-wi1)wi3Δi+2diwi0wi3π,C4=wi1wi2Δi-2diwi0π(wi0+wi2)-2di+1wi3π(wi3+wi1),C5=wi3-wi2wi0Δi+2di+1wi0wi3π,C6=2di+1wi32π,C7=(wi2-wi3)wi1Δi+2diwi0π(wi3-wi2)-2di+1wi1wi3π,C8=wi0-wi1wi2-wi3Δi+2diwi0πwi2-wi3+2di+1wi3π(wi1-wi0).The denominator of (25) is always positive. Thus, the sufficient condition for monotonicity preserving curve is(27)Mu=C1cos⁡u1-sinu2+C2cos⁡u(1+sin2u)+C3cos⁡u+2C4cos⁡usinu+C5sinu+C6sinu(1+cos⁡2u)+C7sinu1-cos⁡u2+C8≥0.To ensure (27) is positive, we use the universal formula(28)cos⁡u=1-λ21+λ2,sinu=2λ1+λ2to rewrite M(u) as(29)mλ=11+λ23×K11-λ6+K21-λ5λ+K31-λ4λ2+K41-λ3λ3+K51-λ2λ4+K61-λ1λ5+K7λ6,where(30)K1=R1,K2=2(R1+R2+R3),K3=8R2+8R3+2R4+2R5,K4=8R2+16R3+8R4+8R5,K5=4R2+16R3+16R4+4R5,K6=8(R3+R4+R6),K7=8R6,R1=C1+C2+C3+C8=2diwi02π,R2=C2+C3+C4+C6+C8=wi0Δiwi2-2di+1wi3πΔi,R3=C2+C3+C4+C5+C6+C8=wi0wi3Δi,R4=C2+C4+C5+C6+C8=wi3Δiwi1-2diwi0πΔi,R5=C2+C4+C6=12wi1Δiwi2-4di+1wi3πΔillllllllll+wi2Δiwi1-4diwi0(πΔi),R6=C5+C6+C7+C8=2di+1wi32π.If conditions (21) hold, we have Ri>0, i=1,2,…,6. Then Ki>0, i=1,2,…,7, m(λ)>0, and hence Pi′(t)>0. As a conclusion, interpolant (7) preserves the monotonicity through monotone data under conditions (21).To demonstrate the developed scheme, we construct monotonicity preserving curves from two monotone data sets given in Tables6 and 7 and compare our method with methods [6, 7, 10]. Figures 6(a) and 6(b) show the curves generated by our method with assigning random values to the four shape parameters, which are not monotone.Table 6
A 2D monotone dataset.
i
1
2
3
4
5
6
7
8
9
10
11
t
i
1
4
6.5
7
11
15
20
25
40
44
45
f
i
1
1
2
3.5
5.5
5.5
10
10
12.5
18
20Table 7
A 2D monotone dataset.
i
1
2
3
4
5
6
7
8
9
10
11
t
i
0
2
3
5
6
8
9
11
12
14
15
f
i
10
10
10
10
10
10
10.5
15
50
60
80Figure 6
Nonmonotone curves from monotone data sets in Tables6 and 7 using our method with random shape parameters.
(a)
w
i
0
=
0.7
,
w
i
1
=
0.5
,
w
i
2
=
0.5
,
w
i
3
=
0.8
(b)
w
i
0
=
1
,
w
i
1
=
0.5
,
w
i
2
=
0.5
,
w
i
3
=
1Remark 4.
In [7], the authors proved a group of conditions for shape parameters to generate monotonicity preserving curves from monotone data,(31)wi0>0,wi3>0,max⁡0,wi0,diwi0πΔi<wi1<1+diπΔiwi0,max⁡0,wi3,di+1wi3πΔi<wi2<1+di+1πΔiwi3.However, from our experiments, the generated curves are not monotone when the shape parameters are set according to the conditions; see Figure 7. We apply constraints (31) to the data in Table 6 and set wi0=wi3=0.3; then the values of bounds of wi1 and wi2 are computed as shown in Table 8. We choose wi1 and wi2 with the values which are a little larger than their left bounds, a little less than their right bounds, and the middle point of their intervals, respectively. There are three curves constructed from the same data in Table 6, as shown in Figure 7(a). It is easy to observe that three curves are not monotone and tend to be monotone as wi1 and wi2 increase. Similar results displayed in Figure 7(b) are generated when we set wi0=wi3=2.0, wi1, and wi2 as the values in Table 9. These conclude that constraints (31) cannot work correctly for generating a monotonicity preserving curve with the data in Table 6.
In order to solve the above problem, we derive the new constraints for method [7] with a similar deduction in this paper,(32)wi0>0,wi3>0,wi1>2diwi0πΔi,wi2>2di+1wi3πΔi.The details can be seen in the appendix. With the same values of wi0 and wi3 as before, wi0=wi3=0.3 or wi0=wi3=2.0, we set wi1=0.8, wi2=0.9 or wi1=4.0, wi2=4.0 which meet conditions (32), i=1,…,10. With these parameters, monotonicity preserving curves can be constructed using method [7] and are shown in Figures 8(a) and 8(b). Setting a group of appropriate parameters, the curves generated by method [10], our method, and method [6] are also shown in Figures 8(c), 8(d), 8(e), 8(f), 8(g), and 8(h). From Figure 8, it is not difficult to find that method [7] with new conditions (32) and our method can generate similar fairness monotonicity preserving curves while the curves generated by methods [6, 10] have extra inflections.
Figures9 and 10 show another example whose data are from Table 7. Tables 10 and 11 give the values of parameters wi1 and wi2 under constraints (31) when setting  wi0=wi3=0.3 or wi0=wi3=3.0. Six corresponding curves constructed by method [7] are displayed in Figure 9. In Figure 10, the curves generated by method [7] with new constraints (32), method [10], our method, and method [6] are shown.
We also compare our method with other three methods [6, 7, 10] on the computational time by creating the curves from the data in Tables 6 and 7. The function evaluating times are listed in Table 12. From this table, compared to other methods, our method takes the least time to generate a monotone curve.Table 8
The values of shape parameters for curves in Figure7(a).
i
1
2
3
4
5
6
7
8
9
10
w
i
1
max
⁡
0
,
w
i
0
,
d
i
w
i
0
/
(
π
Δ
i
)
⁡
0.30
0.30
0.30
0.35
0.30
0.30
0.30
0.30
0.30
0.30
Midpoint
0.30
0.30
0.33
0.50
0.30
0.30
0.30
0.30
0.37
0.35
1
+
d
i
/
(
π
Δ
i
)
w
i
0
0.30
0.30
0.36
0.65
0.30
0.30
0.30
0.30
0.43
0.39
w
i
2
max
⁡
0
,
w
i
3
,
d
i
w
i
+
1
3
/
(
π
Δ
i
)
0.30
0.44
0.30
0.30
0.30
0.30
0.30
1.06
0.30
0.30
Midpoint
0.30
0.59
0.33
0.30
0.30
0.30
0.30
1.21
0.37
0.33
1
+
d
i
+
1
/
(
π
Δ
i
)
w
i
3
0.30
0.74
0.36
0.30
0.30
0.30
0.30
1.36
0.43
0.36Table 9
The values of shape parameters for curves in Figure7(b).
i
1
2
3
4
5
6
7
8
9
10
w
i
1
max
⁡
0
,
w
i
0
,
d
i
w
i
0
/
(
π
Δ
i
)
2.00
2.00
2.00
2.36
2.00
2.00
2.00
2.00
2.00
2.00
Midpoint
2.00
2.00
2.20
3.36
2.00
2.00
2.00
2.00
2.43
2.30
1
+
d
i
/
(
π
Δ
i
)
w
i
0
2.00
2.00
2.39
4.36
2.00
2.00
2.00
2.00
2.86
2.59
w
i
2
max
⁡
0
,
w
i
3
,
d
i
w
i
+
1
3
/
(
π
Δ
i
)
2.00
3.00
2.00
2.00
2.00
2.00
2.00
7.09
2.00
2.00
Midpoint
2.00
3.98
2.20
2.00
2.00
2.00
2.00
8.09
2.43
2.20
1
+
d
i
+
1
/
(
π
Δ
i
)
w
i
3
2.00
4.95
2.40
2.00
2.00
2.00
2.00
9.09
2.86
2.41Table 10
The values of shape parameters for curves in Figure9(a).
i
1
2
3
4
5
6
7
8
9
10
w
i
1
max
⁡
0
,
w
i
0
,
d
i
w
i
0
/
(
π
Δ
i
)
0.30
0.30
0.30
0.30
0.30
0.30
0.53
0.30
0.30
0.30
Midpoint
0.30
0.30
0.30
0.30
0.30
0.30
0.68
0.32
0.42
0.33
1
+
d
i
/
(
π
Δ
i
)
w
i
0
0.30
0.30
0.30
0.30
0.30
0.30
0.83
0.33
0.54
0.36
w
i
2
max
⁡
0
,
w
i
3
,
d
i
w
i
+
1
3
/
(
π
Δ
i
)
0.30
0.30
0.30
0.30
0.30
2.40
0.53
0.30
0.30
0.30
Midpoint
0.30
0.30
0.30
0.30
0.30
2.56
0.68
0.32
0.42
0.32
1
+
d
i
+
1
/
(
π
Δ
i
)
w
i
3
0.30
0.30
0.30
0.30
0.30
2.71
0.83
0.33
0.54
0.33Table 11
The values of shape parameters for curves in Figure9(b).
i
1
2
3
4
5
6
7
8
9
10
w
i
1
max
⁡
0
,
w
i
0
,
d
i
w
i
0
/
(
π
Δ
i
)
3.00
3.00
3.00
3.00
3.00
3.00
5.53
3.00
3.00
3.00
Midpoint
3.00
3.00
3.00
3.00
3.00
3.00
6.85
3.17
4.21
3.30
1
+
d
i
/
(
π
Δ
i
)
w
i
0
3.00
3.00
3.00
3.00
3.00
3.00
8.35
3.34
5.41
3.60
w
i
2
max
⁡
0
,
w
i
3
,
d
i
w
i
+
1
3
/
(
π
Δ
i
)
3.00
3.00
3.00
3.00
3.00
24.06
5.35
3.00
3.00
3.00
Midpoint
3.00
3.00
3.00
3.00
3.00
25.56
6.85
3.17
4.20
3.15
1
+
d
i
+
1
/
(
π
Δ
i
)
w
i
3
3.00
3.00
3.00
3.00
3.00
27.06
8.35
3.34
5.41
3.30Table 12
The time statistics for different methods.
Figure
Time(s)
[6]
[7]
[10]
Our method
Figure8
0.0490
0.0540
0.0690
0.0500
Figure10
0.0420
0.0450
0.0470
0.0380Figure 7
The curves generated by method [7] with constraints (31). (a) and (b) show the curves which are constructed by using the parameters in Tables 8 and 9.
(a)
(b)Figure 8
Comparisons of the monotonicity preserving curves constructed by method [7] with new constraints (32), method [10], and our method with different setting of the parameters wi0 and wi3 and method [6] with different parameters αi and βi. (a) and (b) are for method [7] with parameters (wi0=0.3,wi1=0.8,wi2=0.9,wi3=0.3) and (wi0=2,wi1=4,wi2=4,wi3=2). (c) and (d) are generated from method [10] with parameters (wi0=0.3,wi1=8,wi2=9,wi3=0.3) and (wi0=2,wi1=42,wi2=45,wi3=2). (e) and (f) are from our method with parameters (wi0=0.3,wi1=0.7,wi2=1.1,wi3=0.3) and (wi0=2,wi1=3,wi2=4,wi3=2). (g) and (h) are constructed by method [6] with parameters (αi=2.9,βi=3) and (αi=15,βi=16).
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)Figure 9
The curves generated by method [7] with constraints (31). (a) The parameters in Table 10. (b) The parameters in Table 11.
(a)
(b)Figure 10
Comparisons of the monotonicity preserving curves constructed by ((a) and (b)) method [7] with new constraints (32), ((c) and (d)) method [10], ((e) and (f)) our method, with different setting of the parameters wi0 and wi3, and ((g) and (h)) method [6] with different parameters αi and βi. The parameters are set as (a) (wi0=0.3,wi1=1.2,wi2=1.5,wi3=0.3), (b) (wi0=3,wi1=10,wi2=15,wi3=3), (c) (wi0=0.3,wi1=8,wi2=9,wi3=0.3), (d) (wi0=3,wi1=80,wi2=90,wi3=3), (e) (wi0=0.3,wi1=0.7,wi2=1.1,wi3=0.3), (f) (wi0=3,wi1=7,wi2=9,wi3=3), (g) (αi=3.5,βi=3.5), and (h) (αi=25,βi=26).
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)


## 3. Error Analysis

This section studies the approximation property of the rational trigonometric quadratic function (7). It is assumed that the data is generated from third order continuously differentiated function f(t)∈C3[t0,tn]. Since the developed interpolation in Section 2 is local, the error of approximation is computed in the subinterval [ti,ti+1].The absolute error is expressed in terms of Peons-Kernel [14] as follows:(33)Rf=f(t)-Pi(t)≤12f3(t)∫titi+1‍Rtt-τ+2dτ,where Rt(t-τ)+2 is the Peons-Kernel and Rt(t-τ)+2=r(t,τ) for ti<τ<t and Rt(t-τ)+2=s(t,τ) for t<τ<ti+1. Therefore, the integral involved in (33) can be expressed as(34)∫titi+1‍Rtt-τ+2dτ=∫tit‍r(t,τ)dτ+∫tti+1‍s(t,τ)dτ.For the C1 rational quadratic trigonometric function (7), r(t,τ) and s(t,τ) have the value(35)rt,τ=t-τ2-1qiuwi2B2+wi3B3ti+1-τ24hiwi3B2πll-4hiwi3B2πti+1-τ,st,τ=-1qiu(wi2B2+wi3B3)ti+1-τ24hiwi3B2π-4hiwi3B2πti+1-τ.To derive the error estimate, Rf, the properties of the kernel functions r(t,τ) and s(t,τ) need to be studied first, and then the values ∫tit‍r(t,τ)dτ and ∫tti+1‍s(t,τ)dτ will be calculated.Part 1.
Studying the properties of the functionsr(t,τ) and s(t,τ), we consider r(t,τ), τ∈[ti,t], and s(t,τ), τ∈[t,ti+1], as quadratic polynomial functions of the variable τ. It is observed by the simple computation that, for all t∈[0,1], s(t,ti+1)=0. By substituting τ=t in (35), it takes the form(36)rt,t=st,t=-hi21-δqiuwi2B2+wi3B31-δ-4wi3B2π=hi21-δ1-cos⁡uqiu×2wi2π·ucos⁡u-π2-2wi3wi2cos⁡u+wi3wi2u-π2×wi3wi2=0.The roots of r(t,t) and s(t,t) are δ=0 and δ=1. Next, we discuss whether there are other cases. Equation (36) can be expressed as(37)ucos⁡u-π2-2Acos⁡u+Au-πA2=0,A=wi3wi2.Equation (36) also can be rearranged as(38)sinx=Ax2A-x,x∈0,π2.In the interval [0,π/2], (37) having a root is equivalent to f1(x)=sinx and f2(x)=Ax/(2A-x) having an intersection point.
Considering the first order derivative and the second order derivative of the functionf2(x),(39)f2′(x)=2A22A-x2>0,f2′′(x)=4A22A-x3.(i)
ForA≥π/4, f2′′(x)>0, f1(x)=sinx, and f2(x)=Ax/(2A-x) have an intersection point only if(40)f2(π2)>f1(π2)⟹A<π4-π.So, whenπ/4≤A<π/(4-π), f1(x) and f2(x) intersect each other.(ii)
For0<A<π/4, we should discuss f2′′(x) in intervals (0,2A) and (2A,π/2).Whenx∈(0,2A), if f2′′(x)>0, limx→2A-f2(x)=+∞.Whenx∈(2A,π/2), if f2′′(x)<0, f2(x)<0 and limx→2A+f2(x)=-∞.So, when0<A<π/4, f1(x) and f2(x) have an intersection point in interval (0,2A).(iii)
ForA<0, f2′′(x)<0, f2(x)max⁡=πA/(4A-π)<1, f1(x) and f2(x) have no intersection point. All the above discussions can be summarized as follows.Lemma 5.
If0<wi2≤((4-π)/π)wi3, then the roots of r(t,t) and s(t,t) in [0,1] are δ=0 and δ=1. If wi2>((4-π)/π)wi3, then the roots of r(t,t) and s(t,t) in [0,1] are δ=0, δ=1, and δ:=δ∗.The roots ofr(t,τ) are(41)τ1=t+hiB-DA,τ2=t+hiB+DA,where(42)A=2(wi0B0+wi1B1),B=4wi3B2-2π(wi2B2+wi3B3)(1-δ)π,D=B2-4wi0B0+wi1B1·4wi3B21-δ-πwi2B2+wi3B31-δ2lllllll·π-11/2.The roots ofs(t,τ) are τ3=ti+1 and τ4=ti+1-4hiwi3B2/π(wi2B2+wi3B3).Part 2.
Calculating the value of∫tit‍r(t,τ)dτ+∫tti+1‍s(t,τ)dτ, the following possible cases arise.(i)
Forδ∈[0,1], δ∗∉[0,1], and wi2≤((4-π)/π)wi3,(43)ft-Pit≤12f3thi3ϖ1wi1,wi2,δ,ϖ1wi1,wi2,δ=∫tit‍rt,τdτ+∫tti+1‍st,τdτ=∫tit‍rt,τdτ+∫tti+1‍st,τdτ=1qiu2wi3B2δ2-πwi2B2+wi3B31-δδ2π+4wi3B2(1-δ)δ-π(wi2B2+wi3B3)1-δ2δπ+wi0B0+wi1B1δ33+1-δ26wi3B2-πwi2B2+wi3B31-δ3π.(ii)
For0≤δ≤δ∗ and δ∈[0,1] and wi2>((4-π)/π)wi3,(44)f(t)-Pi(t)≤12f3thi3ϖ2wi1,wi2,δ,where(45)ϖ2wi1,wi2,δ=∫tit‍rt,τdτ+∫tti+1‍st,τdτ=-∫tiτ1‍rt,τdτ+∫τ1t‍rt,τdτ-∫tτ4‍st,τdτ+∫τ4ti+1‍st,τdτ=1qiu·-2wi0B0+wi1B13B-DA3+4wi3B2-2πwi2B2+wi3B31-δπB-DA2-8wi3B21-δ-2πwi2B2+wi3B31-δ2π·B-DA-wi0B0+wi1B1δ33-2wi3B2-πwi2B2+wi3B31-δπδ2-4wi3B21-δ-πwi2B2+wi3B31-δ2πδ+64wi3B233π3wi2B2+wi3B32-2wi3B21-δ2π+(wi2B2+wi3B3)1-δ33.(iii)
Forδ∗≤δ≤1 and δ∗∈[0,1] and wi2>((4-π)/π)wi3,(46)f(t)-Pi(t)≤12f3(t)hi3ϖ3(wi1,wi2,δ),where(47)ϖ3wi1,wi2,δ=∫tit‍rt,τdτ+∫tti+1‍st,τdτ=∫tiτ1‍rt,τdτ-∫τ1τ2‍rt,τdτ+∫τ2t‍rt,τdτ+∫tti+1‍st,τdτ=1qiu·2wi0B0+wi1B13B-DA3-4wi3B2-2πwi2B2+wi3B31-δπB-DA2+8wi3B21-δ-2πwi2B2+wi3B31-δ2π·B-DA-2wi0B0+wi1B1δ33B+DA3+4wi3B2-2πwi2B2+wi3B31-δπB+DA2-8wi3B21-δ-2πwi2B2+wi3B31-δ2π·B+DA+wi0B0+wi1B1δ33+2wi3B2-πwi2B2+wi3B31-δπδ2+4wi3B2(1-δ)-π(wi2B2+wi3B3)1-δ2πδ+2wi3B21-δ2π-(wi2B2+wi3B3)1-δ33.Summarizing the above discussion, we can conclude the following theorem.Theorem 6.
The error ofC1 rational quadratic trigonometric function in (7), for f(t)∈C3[t0,tn], in each subinterval [ti,ti+1] is(48)f(t)-Pi(t)≤12f3(t)hi3ci,where ci=max⁡{0≤δ≤1}ϖ(wi1,wi2,δ),(49)ϖ(wi1,wi2,δ)=max⁡{ϖ1(wi1,wi2,δ)},0<wi2≤4-ππwi3,0≤δ≤1,max⁡{ϖ2(wi1,wi2,δ)},wi2>4-ππwi3,0≤δ≤δ∗,max⁡{ϖ3(wi1,wi2,δ)},wi2>4-ππwi3,δ∗≤δ≤1.


## 4. Conclusion

AC1 piecewise rational quadratic trigonometric spline is discussed in this paper to address the problem of the scientific data visualization. We discussed the conditions of four positive shape parameters which are used in positive, monotone, and constrained curve interpolation schemes and analyzed the approximation property of the rational quadratic trigonometric function. To demonstrate our method, comparisons with methods [4–7, 10] are provided. In particular, we found that the conditions given in [7] for constructing monotonic preserving trigonometric spline cannot work well with the numeric experiments in this paper, which are not sufficient to construct monotonic preserving trigonometric spline. For solving this problem, we derived a set of new conditions for method [7]. Generally, our method can construct more fairness curves underlying different requirements, such as positive, monotone, and lying above a line, and use less computational times than other five trigonometric spline methods described in [4–7, 10]. One of our future works is to extend this method to a rational biquadratic surface interpolation scheme for constructing positive, monotone, and constrained surfaces.



---

*Source: 983120-2015-04-16.xml*