Abstract
A control point form of quadratic trigonometric function is developed which obeys all the properties of Bézier curve. To preserve the shape of data, the quadratic trigonometric functions are transformed into \(GC^1\)-interpolating functions. The \(GC^1\)-interpolating functions have two free parameters in each subinterval to control the magnitude and direction of the tangent at the end points interval. Constraints are derived on these free parameters to interpolate positive, monotone and convex data. The order of approximation of developed interpolant is investigated as \(O( {h_{i}^{3}})\).
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Bernstein–Bézier interpolating functions are used for the generation of smooth curves and surfaces. The Bézier functions interpolate first and last control points, and the intermediate control points determine the shape of the curve between the data points. However, these interpolating functions even in rational form do not preserve the intrinsic properties of data (positivity, monotonicity and convexity). The only possibility is to change the value of intermediate control points as hit and trial until the desired shape is obtained. The user is forced to go through this painstaking process for each data.
There exist sufficient polynomial interpolation techniques to preserve the positive, monotone and convex shape of data. Butt and Brodlie (1993) developed a simple algorithm to create positivity-preserving cubic Hermite interpolant. The data consisted of positive values and slopes at the data points. The authors in Butt and Brodlie (1993) interpolated the positive data values and associated slopes in each subinterval by the cubic Hermite interpolant. If in a subinterval the cubic Hermite interpolant failed to preserve positivity, then one or two extra knots were inserted into the concerned interval so that the resulting piecewise cubic Hermite interpolant preserved positivity. Duan et al. (2009) used rational cubic interpolant with two free parameters to control the value, convexity and inflection point of the interpolant at a point. The constraints were developed on these free parameters to acquire the desired results. Fuhr and Kallay (1992) used linear rational B-spline to interpolate monotone data with derivatives as monotone curves. Higham (1992) modified the method of inserting knot, proposed by Fritsch and Butland (1984), to preserve the shape of the monotone data. The monotonicity-preserving scheme presented in Higham (1992) was more efficient and less memory consuming as compared to Fritsch and Butland (1984). Higham (1992) claimed that the proposed algorithm was well suited for the data arising from the discrete approximate solution of an ODE. Hussain and Sarfraz (2008, 2009) developed a piecewise rational cubic function in the most generalized form with four free parameters to preserve the positive as well as monotone shape of the data. In the developed schemes, out of four parametres, two were constrained to preserve the shape of positive data and monotone data, whereas the other two were free to modify the shape of curve if desired. Lamberti and Manni (2001) used cubic Hermite for shape preservation of parametric data. In Lamberti and Manni (2001), the step length was constrained to preserve the shape of the data. Sarfraz (1992) developed a \(C^1\) and Verlan (2010) developed a \(C^2\) interpolation scheme to preserve the convex shape of the data.
Han et al. (2009) presented a cubic trigonometric curve in Bézier form. It was comparable to cubic Bézier curve, but somehow more efficient. In the cubic trigonometric Bézier curve, shape modification was made possible by shape parameters, keeping the control polygon unchanged. It was closer to the given control polygon than the cubic Bézier curves. Moreover, it could exactly represent ellipses.
The study of this paper develops a \(GC^1\) trigonometric interpolant to preserve the three shapes (positive, monotone and convex) of data, since an interpolant preserves the positive, monotone and convex shapes of data if the interpolant, and its first and second derivatives are positive over the entire domain. Keeping this in view, all the possible geometric configurations of interpolants and their first and second derivatives are discussed. The constraints are developed on parameters to ensure that the minimum value of the \(GC^1\) trigonometric interpolant and its derivative remain positive for each shape.
The shape-preserving interpolation scheme developed in this paper is beneficial due to the following reasons:
-
The trigonometric functions are considered unsuitable for shape-preserving interpolation due to their oscillatory behaviour. The trigonometric interpolant developed in this paper has two free parameters in each subinterval. These parameters are used to rein the oscillatory behaviour of trigonometric functions where needed.
-
The shape-preserving interpolation schemes developed in [Hussain and Sarfraz (2008, 2009), Sarfraz (1992)] used rational polynomial, but the trigonometric interpolant developed in this paper is non-rational. It requires less memory usage as compared to [Hussain and Sarfraz (2008, 2009), Sarfraz (1992)].
-
In [Butt and Brodlie (1993), Fritsch and Butland (1984), Fuhr and Kallay (1992), Higham (1992)], the non-rational interpolant (cubic Hermite) was used to preserve the shape of the data. The authors in [Butt and Brodlie (1993), Fritsch and Butland (1984), Fuhr and Kallay (1992), Higham (1992)] inserted extra knots in the subinterval where cubic Hermite failed to preserve the shape of the data. The trigonometric interpolation scheme proposed in this paper does not need to insert an extra knot.
-
The authors in Lamberti and Manni (2001) constrained step length to preserve the shape of the data, whereas the trigonometric interpolation scheme developed in this paper is equally applicable to both uniform and nonuniform data.
-
The proposed interpolation scheme produces a unique curve for the given data and selected values of parameters.
-
The developed trigonometric interpolant inherits all the properties of the Bézier curve. It can be termed as trigonometric Bézier function.
-
Unlike Verlan (2010), the degree of interpolant is same for all the data points.
-
An alternate scheme is developed to preserve the shape of the data.
The rest of the paper is organized as follows. Section 2 presents Bézier-like trigonometric functions. Section 3 develops \(GC^1\) trigonometric functions with two free parameters to control the shape of data. Section 4 addresses the problem of positive, monotone and convex data interpolation. Section 5 is of numerical examples and Sect. 6 concludes the paper.
2 Quadratic trigonometric functions
Let \(\{ {( {x_i,f_i }),i=0,1,2,\ldots ,n}\}\) be the given set of data points defined over the interval \([ {a,b}]\), where \(a=x_0 <x_1 <x_2 <\cdots <x_n =b\). The piecewise quadratic trigonometric function is defined as:
where
\(B_k ( x),\quad k=0,1,2,3\) are the quadratic trigonometric basis functions and \(P_k, k=0,1,2,3\) are the control points.
The quadratic trigonometric functions defined in (1) have the following properties:
-
1.
End point interpolation: The quadratic trigonometric functions (1) interpolate the first and last control point, i.e. \({S_i ( {x_i })}|_{\theta =0} =P_0 \) and \({S_i ( {x_{i+1} })}|_{\theta =\textstyle {\pi \over 2}} =P_3\).
-
2.
Convex hull property: The sum of the basis functions is one, i.e. \(\sum \nolimits _{k=0}^3 {B_k ( x)} =1,\) also the basis functions \(B_k ( x),\, k=0,1,2,3\) are non-negative. Hence the graphical display of quadratic trigonometric functions (1) is bounded in the convex hull of control points \(P_k,\, k=0,1,2,3.\)
-
3.
Invariance under the affine transformation: The quadratic trigonometric functions are invariant under the affine transformations.
Let \(T\) be an affine transformation defined as: \(T( X)=AX+T_1,\)
where \(X\) is the vector to be transformed, \(A\) is the transformation matrix and \(T_1 \) is the translation vector.
Applying the affine transformation \(T\) to the quadratic trigonometric functions (1), we have
Since \(\sum \nolimits _{k=0}^3 {B_k ( x)} =1,\) the expression (2) can be written as:
It can be easily observed that quadratic trigonometric functions (1) behave like Bézier function, but enjoy four control points instead of three in quadratic structure.
3 GC\(^{1}\) trigonometric functions
On applying the \(C^1\)-continuity conditions, \(S_i ( {x_i })=f_i, S_i ( {x_{i+1} })=f_{i+1}, {S}'_i ( {x_i })=d_i, {S}'_i ( {x_{i+1} })=d_{i+1} \), to the quadratic trigonometric functions (1), it takes the form in the following subinterval \([ {x_i,x_{i+1} }]\):
The quadratic trigonometric functions (3) have fixed values of tangents at the end points of interval. The flexible tangents are achieved by the following replacement in (3)
The quadratic trigonometric functions (3) become \(GC^1\) quadratic trigonometric functions as:
where
\(\alpha _i,\quad \beta _i >0\) are the free parameters.
3.1 Error bounds of quadratic trigonometric function
In this section, the interpolation error of \(GC^1\) quadratic trigonometric functions (4) is investigated. It is assumed that data are generated from a function \(f( x)\in C^3[ {x_0,x_n }].\) The absolute interpolation error in the subinterval \(I_i =[ {x_i,x_{i+1}}]\) is:
where \(R_x \)is known as Peano kernel and \(( {x-\tau })_+^2 \) is the truncated power function. The integral involved in (5) is expressed as:
For the \(GC^1\) quadratic trigonometric function (4), we have
where \(B_i( x), \, i=0,1,2,3\) are the quadratic trigonometric basis functions defined in Sect. 2.
It is observed that, for all \(\theta \in [ {0,\frac{\pi }{2}} ],\;r( {x,x_i })=0.\) Substituting \(\tau =x\) in (6) and after some simplification, it takes the form
The roots of \(r({x,x})\) are: \(\delta =0,\;\delta =1,\;\delta =1-\frac{2( {2-\beta _i })}{\pi \beta _i }.\) Let \(1-\frac{2( {2-\beta _i })}{\pi \beta _i }=\delta ^*\)(say).
If \(\beta _i \in [{\frac{4}{\pi +2},2}]\), the roots of \(r( {x,x})\) in \([{0,1}]\) are \(\delta =0,\delta =1\), \(\delta ^*=1-\frac{2( {2-\beta _i })}{\pi \beta _i}.\) If \(\beta _i \notin [{\frac{4}{\pi +2},2}],\) then the roots of \(r( {x,x})\) in \([{0,1}]\) are \(\delta =0\) and \(\delta =1\). It is observed that \(s( {x,x_{i+1} })=0.\) Hence to calculate the roots of \(s( {x,x}),\) it is rearranged as:
To compute the roots of \(r({\tau ,x}),\) it is rearranged as:
The roots of \(r( {\tau ,x})\)are
where
The roots of \(s( {\tau ,x})\) are
Depending on the values of \(\delta \) and \(\beta _i ,\) the following observations are made: If \(\delta \le \delta ^*\) and \(\beta _i \in \left[ {\frac{4}{\pi +2},2} \right] ,\tau _1^*\in \left[ {x_i,x} \right] \) and \(\tau _2^*\notin \left[ {x_i,x} \right] \).
If\(\delta \ge \delta ^*\) and \(\beta _i \in \left[ {\frac{4}{\pi +2},2} \right] \), then \(\tau _1^*,\tau _2^*\in \left[ {x_i,x} \right] .\)
If \(0\le \delta \le 1\) and \(\beta _i >2,\tau _1^*\in \left[ {x_i ,x} \right] \) and \(\tau _2^*\notin \left[ {x_i,x} \right] \).
If \(0\le \delta \le 1\) and \(\beta _i <\frac{4}{\pi +2},\tau _1^*,\tau _2^*\in \left[ {x_i,x} \right] .\)
If \(\delta \le \delta ^*\) and \(\beta _i \in \left[ {\frac{4}{\pi +2},2} \right] ,\tau ^*\in \left[ {x,x_{i+1} } \right] \)
If \(\delta \ge \delta ^*\) and \(\beta _i \in \left[ {\frac{4}{\pi +2},2} \right] ,\tau ^*\notin \left[ {x,x_{i+1} } \right] \).
If \(0\le \delta \le 1\) and \(\beta _i >2,\tau ^*\notin \left[ {x,x_{i+1} } \right] \).
If \(0\le \delta \le 1\) and \(\beta _i <\frac{4}{\pi +2},\tau ^*\notin \left[ {x,x_{i+1} } \right] \). The above discussion provides the different values of absolute error depending on the choice of \(\delta \) and \(\beta _i \).
Case 1: For \(0\le \delta \le \delta ^*,\;\beta _i \in [{\frac{4}{\pi +2},2}],\) the absolute error in \(I_i =[{x_i,x_{i+1} }]\) is
where
Case 2: For \(\delta ^*\le \delta \le 1,\;\beta _i \in [{\frac{4}{\pi +2},2}],\) we have
where
Case 3: For \(0\le \delta \le 1,\;\beta _i >2,\) we have
Case 4: For \(0\le \delta \le 1,\;\beta _i <\frac{4}{\pi +2},\)we have
Theorem 1
The error of \(GC^1\) quadratic trigonometric function (4) in each subinterval \(I_i =[{x_i,x_{i+1}}]\) for \(f( x)\in C^3[{x_0,x_n}]\) is
4 Shape-preserving curve interpolation
In this section, the three shape properties, positivity, monotonicity and convexity, of 2D data are discussed. Constraints are developed on free parameters \(\alpha _i \) and \(\beta _i\) in the description of \(GC^1\) quadratic trigonometric function to preserve the shape of data.
4.1 Positive curve interpolation
Let \(\{{({x_i,f_i }), i=0,1,2,\ldots ,n}\}\) be the positive data defined over the interval \([{a,b}]\) with partition \(a=x_0 <x_1 <x_2 <\cdots <x_n =b,\;f_i >0,\;i=0,1,2,\ldots ,n.\)
The \(GC^1\) quadratic trigonometric functions (4) preserve the positivity if
\(S_i (x)\) has one of the following graphical representations:
-
I.
\(S_i ( x)\) is either increasing or decreasing \(\forall \,\,x\in [{x_i,x_{i+1}}].\) Extrema lie at the end points of the interval \([{x_i,x_{i+1}}]\). In this case, if minima lie at one of the end points then maxima will lie at the other.
-
II.
\(S_i (x)\) is concave over the whole interval \([ {x_i ,x_{i+1}}].\) In this case, minima lie at the end points of the curve.
-
III.
\(S_i (x)\) is convex over the whole interval\([{x_i ,x_{i+1}}].\) In this case, local minima lie in the interior, i.e. at points \(x\in ( {x_i,x_{i+1} }).\)
-
IV.
There are inflection points in the interval \(({x_i,x_{i+1} })\) (function changes it concavity). In this case, local extrema lie at the points \(x\in ( {x_i,x_{i+1} }).\)
In case (I) and (II),\( S_i ( x)\) is positive \(\forall x\in [ {x_i ,x_{i+1} }]\) if \(S_i ( x)>0\) at the end points of the interval \([x_i,x_{i+1} ].\) Since\( S_i ( {x_i })=f_i\) and \(S_i ( {x_{i+1} })=f_{i+1},\) then \(S_i ( x)>0,\;\forall x\in [ {x_i ,x_{i+1}}].\)
In cases (III) and (IV), we shall determine the critical points of (4). These critical points will be points of relative minima or maxima. We shall determine constraints on free parameters \(\alpha _i \) and \(\beta _i \)to ensure the positivity of quadratic trigonometric function at all extrema.
To determine the critical points of \(S_i ( x)\), it is more convenient to express \(S_i ( x)\) as a function of two variables. Let \(u=Sin\theta and \;v=Cos\theta ,\) (4) takes the form:
The critical points of \(S_i ( {u,v})\) are obtained from \(\frac{\partial S_i ( {u,v})}{\partial u}=0\) and \(\frac{\partial S_i ( {u,v})}{\partial v}=0\).
The critical points are \(u_*=\frac{A_0 -A_1 }{A_0 -2A_1 }\) and \(v_*=\frac{A_3 -A_2 }{A_3 -2A_2 }.\)
Since Sin\(\theta ,\mathrm{Cos}\theta \in [{0,1}]\), we shall determine the values of free parameters \(\alpha _i \) and \(\beta _i \) for which \(u_*,v_*\in [{0,1}].\) If \(u_*=0,\) then \(v_*=1\) and vice versa. In either case \(S_i ( {u,v})=0.\) Hence, we shall verify the range of \(\alpha _i \) and \(\beta _i \) for which \(u_*,v_*\in ( {0,1}).\)
\(u_*>0\) if either of the following possibilities is true:
-
(a)
If \(A_0 -A_1 >0\,\) and \(A_0 -2A_1 >0,\) then \(\alpha _i <\frac{-2h_i d_i }{\pi f_i }.\)
-
(b)
\(A_0 -A_1 <0\,\) and \(A_0 -2A_1 <0,\) then \(\alpha _i >\frac{-2h_i d_i}{\pi f_i }.\)
\(u_*<1,\) then the possible cases are:
-
(a)
\(A_1 <0\,\) provided that \(A_0 -2A_1 >0.\) It is true only if \(\alpha _i <\frac{-h_i d_i }{\pi f_i }.\)
-
(b)
\(A_1 >0\,\) provided that \(A_0 -2A_1 <0.\) It is true only if \(\alpha _i >\frac{-h_i d_i }{\pi f_i }.\)
Thus, it can be concluded that \(u_*\in ( {0,1})\) if
-
(i)
\(\alpha _i <\mathrm{Min}\{ {\frac{-h_i d_i }{\pi f_i },\frac{-2h_i d_i }{\pi f_i }}\},\) when \(d_i <0\).
-
(ii)
\(\alpha _i >\mathrm{Max}\{ {\frac{-h_i d_i }{\pi f_i },\frac{-2h_i d_i }{\pi f_i }}\},\) when \(d_i >0.\)
In a similar way, it can be observed that \(v_*\in ( {0,1})\) if
-
(i)
\(\beta _i <\mathrm{Min}\{ {\frac{h_i d_{i+1} }{\pi f_{i+1} },\frac{2h_i d_{i+1} }{\pi f_{i+1} }}\},\) when \(d_{i+1} >0.\)
-
(ii)
\(\beta _i >\mathrm{Max}\{ {\frac{h_i d_{i+1} }{\pi f_{i+1} },\frac{2h_i d_{i+1} }{\pi f_{i+1} }}\},\) when \(d_{i+1} <0.\)
After substituting the values of \(u_*\) and \(v_*, \) (8) becomes as follows:
From (9), it is clear that \(S_i ( {u_*,v_*})>0\) if \(2A_1 -A_0 >0\) and \(2A_2 -A_3 >0. 2A_1 -A_0 >0\) and \(2A_2 -A_3 >0\) if
All the above discussion can also be summarized as:
Theorem 2
The piecewise \(GC^1\) quadratic trigonometric interpolant \(S_i ( x)\), defined over the interval \([{a,b}]\) in (4), is positive if parameters \(\alpha _i \) and \(\beta _i \)in each subinterval satisfy the following conditions
The above constraints can be rearranged as:
4.2 Monotone curve interpolation
Let \(\{{( {x_i,f_i }),i=0,1,2,\ldots ,n}\}\) be the monotone data defined over the interval \([{a,b}].\) The necessary conditions for the monotonicity of data are
-
(i)
\(\Delta _i =0\,\) then \(d_i =0\,\) and \(d_{i+1} =0;\)
-
(ii)
\(\Delta _i \ne 0\,\) then \(sgn(d_i )=sgn( {d_{i+1} })=sgn( {\Delta _i }).\,\)
In this section, we assume that the data under consideration is monotonically increasing (\(\Delta _i >0,d_i >0,d_{i+1} >0)\). The monotonically decreasing data(\(\Delta _i <0,d_i <0,d_{i+1} <0)\) can be treated in a similar way.
The piecewise quadratic trigonometric functions (4) are monotone if
where
\({S}'_i ( x)\) also have any one of the graphical representations (I)–(IV) discussed in Sect. 4.1.
In case (I)–(II), \({S}'_i ( x)\) is either increasing or decreasing or concave over the whole domain. The monotonicity can be established by assuring the positive value of \({S}'_i ( x)\) at the end points of the interval. Since \({S}'_i ( {x_i })=\frac{d_i }{\alpha _i },{S}'_i ( {x_{i+1} })=\frac{d_{i+1} }{\beta _i },\) \({S}'_i ( x)\) is positive over the whole domain.
In case (III)–(IV), \({S}'_i ( x)\) is convex over the whole domain or has inflection points in the interval; then we shall determine the critical points of \({S}'_i ( x).\) The constraints will be derived on \(\alpha _i \) and \(\beta _i \) to assure a positive value of \({S}'_i ( x)\) at the critical points. In this case, \({S}'_i ( x)\) will be positive if the minimum value of \({S}'_i ( x)\) is positive in the whole interval.
where \(u=\mathrm{Sin}\theta , \quad v=\mathrm{Cos}\theta .\)
The critical point of \({S}'_i ( {u,v})\) is \(( {u_*,v_*})=\left( {\frac{C_0 }{C_0 +C_2 -C_1 },\frac{C_2 }{C_0 +C_2 -C_1 }}\right) .\)
-
(a)
\(u_*>0\) and \(v_*>0,\) if \(C_0 +C_2 -C_1 >0\,\) where \(C_0 +C_2 -C_1 =-\pi \Delta _i +\frac{2d_i }{\alpha _i }+\frac{2d_{i+1} }{\beta _i }.\,\,C_0 +C_2 -C_1 >0\,\) if \(\alpha _i <\frac{4d_i }{\pi \Delta _i }\) and \(\beta _i <\frac{4d_{i+1} }{\pi \Delta _i }.\)
-
(b)
\(u_*<1\) and \(v_*<1\) if \(\frac{C_0 }{C_0 +C_2 -C_1 }<1\) or \(C_2 -C_1 >0,\) where \(C_2 -C_1 =-\pi \Delta _i +\frac{d_i }{\alpha _i }+\frac{2d_{i+1} }{\beta _i }. \quad C_2 -C_1 >0\) if \(\alpha _i <\frac{2d_i }{\pi \Delta _i }\) and \(\beta _i <\frac{4d_{i+1} }{\pi \Delta _i }.\)
From the above discussion it can be concluded that \(u_*,v_*\in ( {0,1})\) if
\({S}'_i ( {u_*,v_*})>0\) if \(C_0 +C_2 -C_1 >0.\)
All the above discussions can be summarized as:
Theorem 3
The piecewise \(GC^1\) quadratic trigonometric interpolant \(S_i ( x)\), defined over the interval \([{a,b}],\) in (4), is monotone if the parameter \(\alpha _i \) and \(\beta _i\) in each subinterval \(I_i =[ {x_i,x_{i+1}}]\) satisfy the following conditions:
The above constraints can be rearranged as:
for any real number \(c_i,\;d_i <0.\)
4.3 Convex curve interpolation
Let \(\{{( {x_i,f_i }),i=0,1,2,\ldots ,n}\}\) be the convex data defined over the interval \([{a,b}].\) The necessary conditions for the convexity of data are
The piecewise \(GC^1\) quadratic trigonometric functions defined in (4) are convex if
where
with \(D_0 =C_1 -C_0 -C_2 \) and \(D_1 =C_0 +C_2 -C_1.\)
\(S_i ( x)\) will be convex in the whole interval \([{x_i,x_{i+1} }],\) if \({S}''_i ( x)\) is positive at local minimas.
Compute theoretical points of \({S}''_i ( x)\) and derive the constraints on the free parameters \(\alpha _i \) and \(\beta _i ,\) such that the value of \({S}''_i ( x)\) is positive at the critical points. \({S}''_i ( x)\) is written as:
where \(u=\mathrm{Sin}\theta \) and \(v=\mathrm{Cos}\theta .\)
The critical points of \({S}''_i ( {u,v})\) are \(u_*=\frac{C_0 }{2D_1 }\) and \(v_*=\frac{-C_2 }{2D_0 }.\)
-
(a)
\(u_*>0\) if either (\(C_0 >0\) and \(D_0 >0)\) or (\(C_0 <0\) and \(D_0 <0)\), where \(C_0 =\frac{d_i }{\alpha _i }\,\) and \(D_0 =\pi \Delta _i -2( {\frac{d_i }{\alpha _i }+\frac{d_{i+1} }{\beta _i }}).\;C_0 >0\) and \(D_0 >0,\) if \(\alpha _i >\frac{4d_i }{\pi \Delta _i }\) and \(\beta _i >\frac{4d_{i+1} }{\pi \Delta _i }.\;C_0 <0\) and \(D_0 <0,\) if \(\alpha _i <\frac{4d_i }{\pi \Delta _i }\) and \(\beta _i <\frac{4d_{i+1} }{\pi \Delta _i }.\)
-
(b)
\(u_*<1\) if either (\(C_0 <2D_0 \) and \(D_0 >0)\) or (\(C_0 >2D_0 \) and \(D_0 <0).C_0 <2D_0 \) and \(D_0 >0,\) if \(\alpha _i >\frac{3d_i }{\pi \Delta _i }\) and \(\beta _i >\frac{4d_{i+1} }{\pi \Delta _i }.\;C_0 >2D_0 \) and \(D_0 <0,\) if \(\alpha _i <\frac{3d_i }{\pi \Delta _i }\) and \(\beta _i <\frac{4d_{i+1} }{\pi \Delta _i }.\)
Thus \(u_*\in ( {0,1})\) if
-
(i)
\(\alpha _i >\mathrm{Max}\left\{ {\frac{3d_i }{\pi \Delta _i },\frac{4d_i }{\pi \Delta _i }} \right\} \) and \(\beta _i >\frac{4d_{i+1} }{\pi \Delta _i }\), when \(d_i >0.\)
-
(ii)
\(\alpha _i <\mathrm{Min}\left\{ {\frac{3d_i }{\pi \Delta _i },\frac{4d_i }{\pi \Delta _i }} \right\} \) and \(\beta _i <\frac{4d_{i+1} }{\pi \Delta _i },\) when \(d_i <0.\)
-
(a)
\(v_*>0,\) if (\(C_2 >0\) and \(D_1 <0)\) or (\(C_2 <0\) and \(D_1 >0).C_2 >0\) and \(D_1 <0,\) if \(\alpha _i <\frac{4d_i }{\pi \Delta _i }\) and \(\beta _i <\frac{4d_{i+1} }{\pi \Delta _i }\).\(C_2 <0\) and \(D_1 >0,\) if \(\alpha _i >\frac{4d_i }{\pi \Delta _i }\) and \(\beta _i >\frac{4d_{i+1} }{\pi \Delta _i }\).
-
(d)
\(v_*<1,\) if (\(-C_2 <2D_1 \) and \(D_1 >0)\) or (\(-C_2 >2D_1 \) and \(D_1 <0)\). \(-C_2 <2D_1 \) and \(D_1 >0,\) if \(\alpha _i <\frac{4d_i }{\pi \Delta _i }\) and \(\beta _i <\frac{5d_{i+1} }{\pi \Delta _i }.\;-C_2 >2D_1 \) and \(D_1 <0,\) if \(\alpha _i >\frac{4d_i }{\pi \Delta _i }\) and \(\beta _i >\frac{5d_{i+1} }{\pi \Delta _i }.\)
Thus, \(v_*\in ( {0,1})\) if
-
(i)
\(\alpha _i =\frac{4d_i}{\pi \Delta _i}\) and \(\frac{5d_{i+1} }{\pi \Delta _i }<\beta _i <\frac{4d_{i+1} }{\pi \Delta _i }\), when \(d_{i+1} <0.\)
-
(ii)
\(\alpha _i =\frac{4d_i }{\pi \Delta _i }\) and \(\frac{4d_{i+1} }{\pi \Delta _i }<\beta _i <\frac{5d_{i+1} }{\pi \Delta _i }\), when \(d_{i+1} <0.\)
\({S}''_i ( {u_*,v_*})>0\) if
\(D_0 >0\,\) and \(-D_1 >0\) if
All the above discussions can be summarized as follows:
Theorem 4
The piecewise \(GC^1\) quadratic trigonometric interpolant \(S_i ( x)\), defined over the interval \([{a,b}],\) in (4), is convex if the parameter \(\alpha _i \,\) and \(\beta _i\) in each subinterval \(I_i =[{x_i,x_{i+1}}]\) satisfy the following conditions:
5 Numerical examples
In this section, the shape-preserving trigonometric schemes developed in Sect. 4 are implemented on some positive, monotone and convex data sets.
A positive data set is taken in Table 1. The positive data in Table 1 is interpolated in Figs. 1 and 2 by \(GC^1\) quadratic trigonometric function (4) for arbitrary values of free parameters \(( {\alpha _i =1, \beta _i =1.5}).\) It is clear from Fig. 2 that \(GC^1\) quadratic trigonometric function (4) fails to preserve the shape of positive data taken in Table 1 for arbitrary chosen values of parameters. The positive curve in Fig. 3 is produced by interpolating the same data by the positive curve interpolation scheme developed in Sect. 4.1.
Other positive data sets are taken in Tables 2 and 3. Figures 4 and 6 are produced by interpolating the positive data in Tables 2 and 3 for arbitrary values of parameters. The \(GC^1\) quadratic trigonometric function (4) does not preserve the shape of positive data in Figs. 4 and 6 for randomly chosen values of parameters. Positive curves in Figs. 5 and 7 are produced by interpolating the positive data of Tables 2 and 3 by the positive curve interpolation scheme developed in Sect. 4.1.
Three monotone data sets are taken in Tables 4, 5 and 6. The monotone data of Table 4 is interpolated by \(GC^1\) quadratic trigonometric function (4) in Fig. 8 for arbitrary values of parameters \(( {\alpha _i =0.5,\beta _i =5}).\) It is clear from Fig. 8 that \(GC^1\) quadratic trigonometric function (4) fails to preserve the shape of monotone data for randomly chosen parameters. The monotone curve in Fig. 9 is produced by interpolating the same data by the monotone curve interpolation scheme developed in Sect. 4.2. The monotone data sets of Tables 5 and 6 are interpolated in Figs. 10 and 12 by \(GC^1\) quadratic trigonometric function (4) for random values of parameters. It is clear from Figs. 10 and 12 that the trigonometric interpolant (4) does not preserve the monotone shape of the data. The monotone curves in Figs. 11 and 13 are produced by interpolating the monotone data of Tables 5 and 6 by the monotone curve interpolation scheme of Sect. 4.2. Hence, the monotone curve interpolation scheme developed in Sect. 4.2 preserves the shape of the monotone data.
The convex data sets are taken in Tables 7, 8 and 9. Figures 14, 16 and 18 are produced by interpolating the convex data in Tables 7, 8 and 9, respectively, by \(GC^1\) quadratic trigonometric functions (4) for arbitrary values of free parameters \(\alpha _i \) and \(\beta _i \). It is clear from these figures that \(GC^1\) quadratic trigonometric functions failed to preserve the shape of the convex data. The convex trigonometric curves in Figs. 15, 17 and 19 are drawn with the convex data in Tables 7, 8 and 9, respectively, using the convex curve interpolation scheme developed in Sect. 4.3.
6 Conclusion
This paper gives an alternative approach to preserve the shape of data using a trigonometric interpolant. Constraints are derived on free parameters to preserve the shape of the data. The order of approximation of the proposed interpolant is \(O( {h_i^3 })\). The interpolated curves are unique for the given data and parameters. The degree of interpolant is identical for all data and the interpolant is equally fruitful for uniform as well as nonuniform data. The derivatives at the knots can be computed from any efficient numerical scheme. In the proposed schemes, the derivatives are calculated by arithmetic mean approximation techniques.
References
Butt S, Brodlie KW (1993) Preserving positivity using piecewise cubic interpolation. Comput Graph 17(1):55–64
Duan Q, Zhang H, Zhang Y, Twizell EH (2007) Error estimation of a kind of rational spline. J Comput Appl Math 20(1):1–11
Duan Q, Bao F, Du S, Twizell EH (2009) Local control of interpolating rational cubic spline curves. Comput Aided Des 41:825–829
Fritsch FN, Butland J (1984) A method for constructing local monotone piecewise cubic interpolants. SIAM J Sci Stat Comput 5:300–304
Fuhr RD, Kallay M (1992) Monotone linear rational spline interpolation. Comput Aided Geom Design 9(4):313–319
Goodman TNT (2002) Shape preserving interpolation by curves. In: Levesley J, Anderson IJ, Mason JC (eds.) Algorithms for approximation, vol 4. University of Huddersfield Proceeding Published, Huddersfield, pp 24–35
Han X-A, Ma Y, Haung X (2009) The cubic trigonometric Bézier curve with two parameters. Appl Math Lett 22:226–231
Higham DJ (1992) Monotone piecewise cubic interpolation with applications to ODE plotting. J Comput Appl Math 39(3–8):287–294
Hussain MZ, Sarfraz M (2008) Positivity-preserving interpolation of positive data by rational cubics. J Comput Appl Math 218(2):446–458
Hussain MZ, Sarfraz M (2009) Monotone piecewise rational cubic interpolation. Int J Comput Math 86(3):423–430
Lamberti P, Manni C (2001) Shape-preserving \(C^2\) functional interpolation via parametric cubics. Numer Algorithms 28:229–254
Sarfraz M (1992) Convexity preserving piecewise rational interpolation for planar curves. Bull Korean Math Soc 29(2):193–200
Verlan I (2010) Convexity preserving interpolation by splines of arbitrary degree. Comput Sci J Maldova 18(1):54–58
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Cristina Turner.
Rights and permissions
About this article
Cite this article
Hussain, M.Z., Hussain, M. & Waseem, A. Shape-preserving trigonometric functions. Comp. Appl. Math. 33, 411–431 (2014). https://doi.org/10.1007/s40314-013-0071-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s40314-013-0071-1