Abstract

A new 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 . Numeric experiments demonstrate that our method can construct nice shape preserving interpolation curves efficiently.

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 [13]. Recently, some approaches in shape preserving interpolation, using the trigonometric splines, are developed. Hussain and Saleem [4] introduced a 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 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 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 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 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 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. Section 2 presents a new 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. 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:where . 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:whereIn [3], it has been proved that the basis is an optimal normalized totally positive basis on . Obviously, matrix 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. Rational Quadratic Trigonometric Spline

In this subsection, a piecewise rational quadratic trigonometric spline with four parameters is developed based on basis (1).

Let be the given set of data points defined over the interval , where . The piecewise quadratic trigonometric function is defined aswhere , , are the basis functions defined in (1),  , , , and the parameters , , , and are the local tension parameters or tension parameters in each subinterval , .

The rational quadratic trigonometric function (4) is transformed to a continuous interpolation spline by applying the following -continuity conditions at the end point of each interval :where denotes derivative with respect to and is derivative value at knot . In most cases, these s are not given directly and must be computed either from the given data 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 s for the data in Table 1 and the geometric mean method for other data.

From conditions (5), the values of , , can be calculated asSubstitute (6) into (4); we havewhere

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 , a piecewise rational quadratic trigonometric spline defined in (7) preserves positivity if the following conditions are fulfilled:

Proof. Considering the data set where , , , the spline defined in (7) preserves positivity if for all in .
It is apparent that , , are sufficient to ensure . Thus, the positivity of depends on the positivity of the trigonometric quadratic polynomial only. Obviously, if all the coefficients are positive. Thus, from (8), we can immediately obtain the following constrains:These imply the theorem.

The above developed scheme is used to make the constructed curve preserve the positivity of data. The curves in Figures 1(a) and 1(b) are drawn by using 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 [47] with a set of appropriate parameters, and the last curves are generated by our scheme. From the results, it can be seen that our piecewise rational quadratic trigonometric spline describes the positive data set more fairly than [47]. 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.

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 line but also above any arbitrary line . 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. The piecewise rational quadratic trigonometric spline defined in (7) preserves the shape of data lying above an arbitrary straight line in each subinterval , , if the following conditions are satisfied:where with and .

Proof. Let be a set of data points lying above a given straight line ; that is,The curve will lie above the straight line if the rational quadratic trigonometric spline (7) satisfies the following condition:For each subinterval , (13) can be expressed asorUsing and as defined in (8), the expression (14) can be rewritten in a simplified form asAccording to (6), we getwhereSince , , (17) is true if , as and can lead to , and ifand ifThese prove the desired result.

The method is demonstrated with producing constrained curves from the data in Tables 4 and 5. The data in Table 4 lies above line , whereas the data given in Table 5 lies above the line . 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.

2.5. Monotone Curve Interpolation

Considering a data set which is monotonically increasing or decreasing , 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. The piecewise rational quadratic trigonometric spline defined in (7) preserves the monotonicity through monotone data in each subinterval , , if the shape parameters satisfy the following conditions:

Proof. Let be a monotonically increasing data set; that is,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 when . In this case, reduces toCase 2. When , is monotonically increasing if and only ifwherewithThe denominator of (25) is always positive. Thus, the sufficient condition for monotonicity preserving curve isTo ensure (27) is positive, we use the universal formulato rewrite aswhereIf conditions (21) hold, we have , . Then , , , and hence . 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 Tables 6 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.

Remark 4. In [7], the authors proved a group of conditions for shape parameters to generate monotonicity preserving curves from monotone data,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 ; then the values of bounds of and are computed as shown in Table 8. We choose and 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 and increase. Similar results displayed in Figure 7(b) are generated when we set , , and 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,The details can be seen in the appendix. With the same values of and as before, or , we set , or , which meet conditions (32), . 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.
Figures 9 and 10 show another example whose data are from Table 7. Tables 10 and 11 give the values of parameters and under constraints (31) when setting   or . 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.

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 . Since the developed interpolation in Section 2 is local, the error of approximation is computed in the subinterval .

The absolute error is expressed in terms of Peons-Kernel [14] as follows:where is the Peons-Kernel and for and for . Therefore, the integral involved in (33) can be expressed asFor the rational quadratic trigonometric function (7), and have the valueTo derive the error estimate, , the properties of the kernel functions and need to be studied first, and then the values and will be calculated.

Part 1. Studying the properties of the functions and , we consider , , and , , as quadratic polynomial functions of the variable . It is observed by the simple computation that, for all , . By substituting in (35), it takes the formThe roots of and are and . Next, we discuss whether there are other cases. Equation (36) can be expressed asEquation (36) also can be rearranged asIn the interval , (37) having a root is equivalent to and having an intersection point.
Considering the first order derivative and the second order derivative of the function ,(i)For , , , and have an intersection point only ifSo, when , and intersect each other.(ii)For , we should discuss in intervals and .When , if , .When , if , and .So, when , and have an intersection point in interval .(iii)For , , , and have no intersection point. All the above discussions can be summarized as follows.

Lemma 5. If , then the roots of and in are and . If , then the roots of and in are , , and .

The roots of arewhere

The roots of are and .

Part 2. Calculating the value of , the following possible cases arise.(i)For , , and ,(ii)For and and ,where(iii)For and and ,whereSummarizing the above discussion, we can conclude the following theorem.

Theorem 6. The error of rational quadratic trigonometric function in (7), for , in each subinterval iswhere ,

4. Conclusion

A 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 [47, 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 [47, 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.

Appendix

In this section, we tried to prove the new constraints on monotone curve interpolation for the method in [7].

Theorem A.1. The piecewise rational cubic trigonometric spline defined in [7] preserves the monotonicity through monotone data in each subinterval , , if the shape parameters satisfy the following conditions:

Proof. Let be a monotonically increasing data set; that is,The case of monotonically decreasing data set can be dealt with in a similar fashion. The following two cases for interpolant (5) defined in [7] arise to preserve the monotonicity of monotone data.
Case 1. One has when . In this case, reduces toThis proves that the interpolant is monotone.
Case 2. When , is monotonically increasing if and only ifFor , is presented in a simple form aswithThe denominator of (A.5) is always positive. Thus, the sufficient conditions for monotonicity preserving curve areTo ensure (A.5) is positive, we can use universal formulato replace , . can be rearranged aswhere , , , , , , ,If the shape parameters hold conditions (A.1), , . Then , , , and . In other words, (A.1) is sufficient for the interpolant (5) defined in [7] preserving the monotonicity of the monotone data.

Conflict of Interests

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

Acknowledgments

The authors would like to thank the anonymous reviewers and the editor for their valuable comments for improvements. The work is supported by The National Natural Science Foundation of China (no. 61173119, no. 11271376), Program for New Century Excellent Talents in University (no. NCET-13-0590), Hunan Province Science and Technology Project (no. 2014FJ2008), The Open Project Program of the State Key Lab of CAD&CG (no. A1414) at Zhejiang University, Mathematics and Interdisciplinary Sciences Project at Central South University, and Postdoctoral foundation at Central South University.