1 Introduction

The shape-preserving techniques have wide spread applications in the machine’s softwares designing, robotics, chemical processes. Lathe is used for the ceramic designing, planks cutting for the wooden furniture, ornament designing etc. The shape-preserving softwares are used for the designing of the lathe path. In chemistry, the shape-preserving interpolation techniques are used for the PARFAC modelling of the fluorescence data, while in robotics, it is used to design the path of the robots. Other applications can be seen in the area of signal processing, editing of the photogrammetric data etc.

Mostly, the interpolation schemes are polynomial based. The polynomials exhibit oscillatory behaviour. These oscillations do not allow them to preserve the intrinsic shapes of the data (positivity, monotonicity and convexity). Authors have taken a keen interest in the development of the shape-preserving interpolation techniques. Brodlie et al. [1] developed a bi-cubic interpolation scheme for the shape preservation of the 3D positive data arranged over a rectangular grid. Sufficient conditions were derived on the first order and mixed partial derivative at the data cites to preserve the positivity of the 3D data. Luo and Peng [17] proposed a positivity-preserving \(C^{1}\) rational spline interpolation scheme for the positive scattered data. The derived positivity-preserving constraints were a system of inequalities with the nodal gradients as the parameters. Mulansky and Schmidt [19] developed a \(C^{1}\) quadratic positivity-preserving interpolation scheme. The sufficient conditions for the positivity preservation were the solvable system of inequalities with gradients as the parameters. Since the system of the inequalities had infinite many solutions, therefore, the optimal solution was obtained by the local and global quadratic programming subject to the developed inequalities. Peng et al. [21] developed a \(C^{1}\) non-negativity preserving interpolation scheme using a bivariate rational spline. The constraints were derived on the partial derivatives at the corners of the grids to preserve positivity.

Beatson and Ziegler [2] interpolated the monotone data defined on a rectangular grid, with a \(C^{1}\) monotone quadratic spline. They derived necessary and sufficient conditions on the functional and derivative values to conserve monotonicity. Carlson and Fritsch [3] proposed a monotonicity-preserving bi-cubic interpolation scheme for the bivariate monotone data arranged over a rectangular grid. The necessary and sufficient conditions on the nodal derivatives were derived to preserve monotonicity. Costantini and Manni [4] proposed a local monotonicity-preserving interpolation scheme for the regular surface data. The numerical scheme proposed in [4] was based on the transfinite blending of the boundary curves, where each boundary curve was defined by a Bézier interpolant. The \(C^{1}\) continuity along the linkage curves and the monotonicity of the surface was preserved by developing constraints on the degree of the interpolants along the adjacent surface patches. It was claimed that the monotonicity-preserving scheme [4] was an improvement of [2] and [3]. The demerits of the monotone surface [4] were the variable degree of the interpolating function and the zero twist at the data cites. Delgado and Peña [5] examplified that the rational Bézier surfaces on the rectangular grid, the tensor-product surfaces with the rational basis and the rational Bézier surfaces on the triangular grids are not monotonicity preserving. Fujioka and Kano [6] proposed an optimal spline approximation scheme with normalized B-spline basis. The monotonicity and convexity constraints were derived on the partial derivatives at the knots. Thus the problem was reduced to the convex quadratic programming problem subject to the monotonicity and convexity constraints. Layche and Merrien [18] introduced a \(C^{1}\) Hermite subdivision scheme for the positivity and co-monotonicity preservation of the 3D positive and monotone data arranged over the rectangular grid. The authors in [18] claimed that the developed shape-preserving schemes were independent of the choice of the derivatives estimation techniques. In [18], the given rectangular domain was subdivided into \(2^{n}\times 2^{n}\) subrectangles. The data values and partial derivatives at the corners of the newest subrectangles were computed. These data values at the corners of the subrectangles were constrained to preserve the positivity and co-monotonicity of the 3D regular data.

Trigonometric functions are orthogonal. Their orthogonality invokes smooth interpolating functions with trigonometric basis [24]. The derivatives of the trigonometric functions do not vanish. Therefore, even the lower degree trigonometric interpolating functions guarantee higher order of smoothness. Schoenberg [23] introduced the trigonometric spline and studied its interpolation properties. Nowadays, the trigonometric splines have replaced the conventional algebraic and parametric splines in a wide range of applications e.g. geometric modelling, signal processing, CAD/CAM and solving differential equations. Robotic trajectories are interpolated by the trigonometric spline [24]. The trigonometric robotic trajectories proved computationally less expensive and smoother than the conventional spline robotic trajectories [24]. The data extracted from the spherical surface is well-suited to the trigonometric splines than the algebraic splines [24]. Xie et al. [25] used a cardinal trigonometric spline for solving the non-linear integral equations. Wavelets based on trigonometric spline are used in signal processing for the ECG (Electrocardiogram) detection [22]. In [710], Han introduced the quadratic and cubic trigonometric polynomial curves and compared these with the ordinary B-spline curves. In [11] and [12], the Bézier like trigonometric polynomial curves were developed and their geometric properties were studied. It is clear from the above discussion that none of the authors used trigonometric polynomial curves and trigonometric splines to preserve the inherent shapes (positive, monotone and convex) of the curve and surface data.

Geometric continuity or the \(GC^{r}\) continuity of the curves and surfaces relates their smoothness to the order of contact [13]. There are many surfaces, like star shaped patch configurations, which cannot be joined with \(C^{r}\) continuity [13]. Thus, there is a need to develop surface interpolation techniques which stitch surface patches with \(GC^{r}\) continuity.

In this research paper, the problem of shape-preservation of positive and monotone 3D regular surface data arranged over a rectangular grid is addressed. A bi-quadratic trigonometric local interpolation scheme is developed to interpolate the 3D data arranged over the rectangular grid. Ordinary trigonometric interpolation schemes are unable to preserve the inherent shapes of the data. The newly constructed bi-quadratic trigonometric interpolating function (4) has four free parameters in each rectangular patch. The order of the continuity of the bi-quadratic interpolant (4) over each rectangular patch is \(GC^{1}\), i.e. it interpolates the data and preserves the direction of the partial derivatives, see Eqs. (10a)–(10f). It is also observed that when the \(GC^{1}\) bi-quadratic trigonometric patches (4) are joined together to form the final surface patch, the order of the continuity over the whole surface is again \(GC^{1}\), see Remark 1, the Eqs. (11a)–(11h). A new technique is adopted to derive constraints on the free parameters of the bi-quadratic trigonometric interpolant (4) to preserve the positive and monotone shapes of the 3D regular surface data. The developed positivity and monotonicity preserving bi-quadratic trigonometric interpolation schemes are also \(GC^{1}\) and local. The trigonometric basis functions assure smooth \(GC^{1}\) positive and monotone surfaces.

The merits and demerits of the shape-preserving \(GC^{1}\) bi-quadratic trigonometric interpolation schemes developed in this research paper have been written in the rest of this section.

  1. (i)

    In [13, 6] and [21], the constraints were developed on the partial derivatives at the data cites to preserve the positive and monotone shape of the regular surface data. Thus these numerical schemes were unable to preserve the shapes of the data with derivatives, e.g. the data arising from the numerical solutions of the partial differential equations. Since the shape-preseving \(GC^{1}\) bi-quadratic trigonometric interpolating schemes developed in this research paper have derived constraints on the free parameters, therefore, these are applicable to both data and data with derivatives.

  2. (ii)

    In [15] and [14], the free parameters were required to remove the crease of the interpolated positive and monotone surfaces. The positive and monotone surfaces interpolated by the \(GC^{1}\) bi-quadratic trigonometric interpolating schemes are inherently smooth due to the orthogonality of the trigonometric basis functions.

  3. (iii)

    The monotonicity-preserving scheme [4] was an improvement of [2] and [3]. In [4], monotonicity was preserved by developing the constraints on the degree of the interpolating function. The shape-preseving \(GC^{1}\) bi-quadratic trigonometric interpolating schemes developed here are of unique degree over the whole domain. Moreover, the twist vectors of the interpolated surfaces [4] were zero at the data cites. The positive and monotone surfaces produced by the shape-preserving bi-quadratic trigonometric interpolation schemes developed in Sect. 4 have non-vanishing twist vectors.

  4. (iv)

    The shape-preseving schemes [15] and [14] were rational, whereas, our positivity and monotonicity preserving bi-quadratic trigonometric interpolation schemes are integral. These are computationally less expensive than [15] and [14]. The comparison of the CPU times is given in Table 5.

  5. (v)

    The proposed shape-preseving \(GC^{1}\) trigonometric interpolation schemes are local.

The evaluation of the trigonometric functions at each step, sine and cosine, seems to be a demerit of the \(GC^{1}\) shape-preserving bi-quadratic trigonometric schemes introduced in this research paper. However, it is clear from the Table 5 that the trigonometric functions do not increase the CPU time required for the implementation of the developed shape-preserving schemes. Morever, there are software available for the fast computation of the trigonometric functions [24].

The paper is organized as follows: Sect. 2 reviews the \(GC^{1}\) continuity for the algebraic curves and surfaces. Section 3 presents the newly developed \(GC^{1}\) bi-quadratic trigonometric function (4). Section 4 contibutes the shape-preserving interpolation schemes for positive and monotone 3D regular surface data. Section 5 presents numerical tests of shape-preserving schemes developed in Sect. 4. Section 6 sums up the entire discussion thus forming a conclusion of the wok done in the previous sections.

2 Preliminaries

In this section, the notion of the geometric continuity of order one(\(GC^{1}\) continuity) for the algebraic curves and surfaces is reviewed.

Definition 1

[13] Let \(\tilde{\tau }=\left\{ {\left( {x_i ,f_i ,d_i } \right) :i=0,1,2,\ldots ,n} \right\} \) be a 2D data set defined over the interval \(\left[ {a,b} \right] \), where the partition of the interval \(\left[ {a,b} \right] \) is \(a=x_0 <x_1 <x_2 <\cdots <x_n =b.\) The \(f_i \) and \(d_i \) are the given ordinate values and the derivative values at the knots \(x_i,\,i=0,1,2,\ldots ,n\). The piecewise interpolating function \(S\left( x \right) \equiv S_i \left( x \right) ,\,i=0,1,2,\ldots ,n-1,\) defined over the interval \(\left[ {a,b} \right] ,\) is said to be \(GC^{1}\) continuous over the sub-interval \(I_i =\left[ {x_i ,x_{i+1} } \right] \) if the following interpolation conditions are satisfied

$$\begin{aligned} S_i \left( {x_i } \right)&= f_i ,\;S_i \left( {x_{i+1} } \right) =f_{i+1} ,S_i^{\prime } \left( {x_i } \right) =Kd_i ,S_i^{\prime } \left( {x_{i+1} } \right) \nonumber \\&= \tilde{K}d_{i+1} , \end{aligned}$$
(1a)

where, \(K\ne 1,\,\tilde{K}\ne 1,\) are positive real numbers.

The interpolating function \(S\left( x \right) \) is said be \(GC^{1}\) continuous over the whole domain \(\left[ {a,b} \right] \) if in addition to (1a), the adjacent curve segments satisfy the following condition

$$\begin{aligned} \left. {S_i^{\prime } \left( x \right) } \right| _{x=x_{i+1} } ={\mathop {K}\limits ^{\smile }}\left. {S_{i+1}^{\prime } \left( x \right) } \right| _{x=x_{i+1} } . \end{aligned}$$
(1b)

Here, \(i=0,1,2,\ldots ,n-1\)  and  \({\mathop {K}\limits ^{\smile }}\ne 1,{\mathop {K}\limits ^{\smile }}>0.\)

Hence, the directions of the first order derivatives of the two adjacent curve segments of a \(GC^{1}\) continuous curve are identical at the linkage knots, \(x_{i+1}\). \(S_{i+1} \left( x \right) \) is the representation of the piecewise interpolating function \(S\left( x \right) \) over the sub interval \(I_{i+1} =\left[ {x_{i+1} ,x_{i+2} } \right] \). \(S_i^{\prime } \left( x \right) \) and \(S_{i+1}^{\prime } \left( x \right) \) are the first order derivatives w.r.t \(x\) of \(S_i \left( x \right) \) and \(S_{i+1} \left( x \right) \) respectively. The piecewise interpolating function \(S\left( x \right) \) is \(C^{1}\)-continuous over the whole domain \(\left[ {a,b} \right] \) for \(\left( {K,\tilde{K},{\mathop {K}\limits ^{\smile }}} \right) =\left( {1,1,1} \right) \), in (1a) and (1b). In Fig. 1, the three point data set \(\left\{ {\left( {-1,1} \right) ,\left( {0,0} \right) ,\left( {1,1} \right) } \right\} \) is interpolated by \(GC^{1}\) interpolating function [16] for different values of \(K,\,\tilde{K}\) and \({\mathop {K}\limits ^{\smile }}\).

Fig. 1
figure 1

\(GC^{1}\)-continuous curves

Definition 2

[13] Let \(\tau =\{ ( {x_i ,y_j ,F_{i,j} } ):i=0,1,2,\ldots ,m; j=0,1,2,\ldots ,n \}\) be the 3D data defined over the rectangular domain \(D=\left[ {a,b} \right] \times \left[ {c,d} \right] \). Let \(p_0 :a=x_0 <x_1 <x_2 <\cdots <x_n =b\) and \(p_1 :c=y_0 <y_1 <y_2 <\cdots <y_n =d\) be the partitions of \(\left[ {a,b} \right] \) and \(\left[ {c,d} \right] \) respectively. The algebraic composite surface \(S(x,y)\) is defined over the \(ijth\) rectangular patch \(I_{i,j} =\left[ {x_i ,x_{i+1} } \right] \times \left[ {y_j ,y_{j+1} } \right] ; i=0,1,2,\ldots ,m-1; \,j=0,1,2,\ldots ,n-1\) as

$$\begin{aligned} S\left( {x,y} \right) \equiv S_{ij} \left( {x,y} \right) , \quad \forall \left( {x,y} \right) \in I_{i,j} . \end{aligned}$$
(2)

The composite algebraic surface \(S\left( {x,y} \right) \) is \(GC^{1}\) continuous over the rectangular patch \(I_{i,j} \) if the following conditions are true

$$\begin{aligned} S\left( {x_r,y_s}\right)&= F_{r,s},\frac{\partial S\left( {x_r ,y_s}\right) }{\partial x}=c_1 F_{r,s}^x ,\frac{\partial S\left( {x_r ,y_s } \right) }{\partial y}\nonumber \\&= c_2 F_{r,s}^y , \quad r=i,i+1;s=j,j+1. \end{aligned}$$
(3a)

\(F_{r,s}^x \) and \(F_{r,s}^y \) are the first order partial derivatives with respect to \(x\) and \(y\) respectively. These partial derivative values are either given or computed by the data set \(\tau \).

\(S\left( {x,y} \right) \) is \(GC^{1}\) continuous along the linkage curves of two adjacent surface patches if the following conditions, (3b)–(3e), are satisfied.

$$\begin{aligned} \frac{\partial S_{i,j} \left( {x_{i+1} ,y} \right) }{\partial x}&= c_3 \frac{\partial S_{i+1,j} \left( {x_{i+1} ,y} \right) }{\partial x},\end{aligned}$$
(3b)
$$\begin{aligned} \frac{\partial S_{i-1,j} \left( {x_i ,y} \right) }{\partial x}&= c_4 \frac{\partial S_{i,j} \left( {x_i ,y} \right) }{\partial x},\end{aligned}$$
(3c)
$$\begin{aligned} \frac{\partial S_{i,j} \left( {x,y_{j+1} } \right) }{\partial y}&= c_5 \frac{\partial S_{i,j+1} \left( {x,y_{j+1} } \right) }{\partial y},\end{aligned}$$
(3d)
$$\begin{aligned} \frac{\partial S_{i,j-1} \left( {x,y_j } \right) }{\partial y}&= c_6 \frac{\partial S_{i,j} \left( {x,y_j } \right) }{\partial y}. \end{aligned}$$
(3e)

Here \(c_l \ne 1,l=1,2,3,4,5,6,\) are the positive real numbers.

The \(S_{i,j}\left( {x_{i+1},y}\right) \), \(S_{i+1,j}\left( {x_{i+1},y}\right) \), \(S_{i-1,j}\left( {x_i,y}\right) \), \(S_{i,j}\left( {x_i,y}\right) \), \(S_{i,j}\left( {x,y_{j+1}}\right) \), \(S_{i,j+1}\left( {x,y_{j+1}}\right) ,S_{i,j-1}\left( {x,y_j}\right) \) and \(S_{i,j}\left( {x,y_j}\right) \) are curves interpolating the boundaries of the rectangular patches \(I_{i+1,j},I_{i,j},I_{i-1,j},I_{i,j-1}\) and \(I_{i,j+1}\).

3 \(\hbox {GC}^{1}\) Bi-quadratic Trigonometric Function

In this section, a \(GC^{1}\) trigonometric interpolation scheme is developed for the 3D regular data. The \(GC^{1}\) quadratic trigonometric function [16] is extended to the \(GC^{1}\) bi-quadratic trigonometric function providing four free parameters for the local modification of the interpolating surface.

Let \(\tau =\left\{ \left( {x_i ,y_j ,F_{i,j} } \right) :i=0,1,2,\ldots ,m; j=0,1,2,\ldots ,n \right\} \) be the given \(\left( {m+1} \right) \times \left( {n+1} \right) \) data values defined over the rectangular domain \(D=\left[ {a,b} \right] \times \left[ {c,d} \right] \). Let \(p_0 :a=x_0 <x_1 <x_2 <\cdots <x_n =b\) and \(p_1 :c=y_0 <y_1 <y_2 <\cdots <y_n =d\) be the partitions of \(\left[ {a,b} \right] \) and \(\left[ {c,d} \right] \) respectively. The bi-quadratic trigonometric function is defined over each rectangular patch \(I_{i,j} =\left[ {x_i ,x_{i+1} } \right] \times \left[ {y_j ,y_{j+1} } \right] ; \,i=0,1,2,\ldots ,m-1; \,j=0,1,2,\ldots ,n-1\) as

$$\begin{aligned} S\left( {x,y}\right) =S_{i,j} \left( {x,y} \right) =\sum \nolimits _{k=0}^3 \sum \nolimits _{l=0}^3 a_k \left( \theta \right) \hat{{a}}_l \left( \varphi \right) Z_{k,l},\nonumber \\ \end{aligned}$$
(4)
$$\begin{aligned}&Z_{0,0}=F_{i,j} ,Z_{0,1} =F_{i,j+1} ,Z_{0,2} =F_{i,j}^y,\\&Z_{0,3}=F_{i,j+1}^y ,Z_{1,0} =F_{i+1,j} ,Z_{1,1} =F_{i+1,j+1},\\&Z_{1,2}=F_{i+1,j}^y ,Z_{1,3} =F_{i+1,j+1}^y ,Z_{2,0} =F_{i,j}^x,\\&Z_{2,1}=F_{i,j+1}^x ,Z_{2,2} =F_{i,j}^{xy} ,Z_{2,3} =F_{i,j+1}^{xy},\\&Z_{3,0}=F_{i+1,j}^x ,Z_{3,1} =F_{i+1,j+1}^x ,Z_{3,2} =F_{i+1,j}^{xy},\\&Z_{3,3}=F_{i+1,j+1}^{xy},\\&a_0\left( \theta \right) =\left( {1-\sin \theta } \right) ^{2}+2 \sin \theta \left( {1-\sin \theta } \right) ,\\&a_1\left( \theta \right) =\left( {1-\cos \theta } \right) ^{2}+2\cos \theta \left( {1-\cos \theta } \right) ,\\&a_2\left( \theta \right) =\frac{2h_i }{\pi \alpha _{i,j} }\sin \theta \left( {1-\sin \theta } \right) ,\\&a_3 \left( \theta \right) =-\frac{2h_i }{\pi \beta _{i,j} }\cos \theta \left( {1-\cos \theta } \right) ,\\&\hat{{a}}_0\left( \varphi \right) =\left( {1-\sin \varphi } \right) ^{2}+2\sin \varphi \left( {1-\sin \varphi } \right) ,\\&\hat{{a}}_1\left( \varphi \right) =\left( {1-\cos \varphi } \right) ^{2}+2\cos \varphi \left( {1-\cos \varphi } \right) ,\\&\hat{{a}}_2\left( \varphi \right) =\frac{2\hat{{h}}_j }{\pi \hat{{\alpha }}_{i,j} }\sin \varphi \left( {1-sin\varphi } \right) ,\\&\hat{{a}}_3 \left( \varphi \right) =-\frac{2\hat{{h}}_j }{\pi \hat{{\beta }}_{i,j} }\cos \varphi \left( {1-\cos \varphi } \right) ,\\&\theta =\frac{\pi }{2}\left( {\frac{x-x_i }{h_i }} \right) ,\;\varphi =\frac{\pi }{2}\left( {\frac{y-y_j }{\hat{{h}}_j }} \right) ,\\&h_i =x_{i+1} -x_i ,\hat{{h}}_j =y_{j+1} -y_j. \end{aligned}$$

\(\alpha _{i,j}\) and \(\beta _{i,j}\) are the free parameters along \(x\)-axis, whereas, \(\hat{{\alpha }}_{i,j} \) and \(\hat{{\beta }}_{i,j} \) are the free parameters along \(y\)-axis. These free parameters are assumed positive real numbers. \(F_{k,l}^x,\,F_{k,l}^y \) and \(F_{k,l}^{xy} ,\) where \(k=i,i+1;\,l=j,j+1,\) represent the derivative data values at the four corners of the rectangular patch \(I_{i,j} .\) Here, \(F_{k,l}^x ,F_{k,l}^y \) are the first order partial derivatives with respect to \(x\) and \(y\) respectively, whereas, \(F_{k,l}^{xy} \) stands for the mixed partial derivatives. The values of these partial derivatives are either provided with the data or can be computed numerically from the given data set \(\tau \) through any derivative approximation scheme.

Substituting the values of the trigonometric basis functions \(a_k \left( \theta \right) ,\,\hat{{a}}_l \left( \varphi \right) \) and the coefficients \(Z_{k,l} , k,l\!=\!0,1,2,3,\) in Eq. (4), the bi-quadratic trigonometric interpolating function \(S\left( {x,y} \right) \) is defined over \(I_{i,j} \)as

$$\begin{aligned} S\left( {x,y} \right)&= \left( {1-\sin \theta } \right) ^{2}P_0 +2\sin \theta \left( {1-\sin \theta } \right) P_1\nonumber \\&+\,2\cos \theta \left( {1-\cos \theta } \right) P_2 +\left( {1-\cos \theta } \right) ^{2}P_3 ,\quad \end{aligned}$$
(5)

with

$$\begin{aligned} P_0&= \left( {1-\sin \varphi } \right) ^{2}P_{0,0} +2\sin \varphi \left( {1-\sin \varphi } \right) P_{0,1}\nonumber \\&+\,2\cos \varphi \left( {1-\cos \varphi } \right) P_{0,2} +\left( {1-\cos \varphi } \right) ^{2}P_{0,3} ,\end{aligned}$$
(6)
$$\begin{aligned} P_1&= \left( {1-\sin \varphi } \right) ^{2}P_{1,0} +2\sin \varphi \left( {1-\sin \varphi } \right) P_{1,1}\nonumber \\&+\,2\cos \varphi \left( {1-\cos \varphi } \right) P_{1,2} +\left( {1-\cos \varphi } \right) ^{2}P_{1,3} ,\end{aligned}$$
(7)
$$\begin{aligned} P_2&= \left( {1-\sin \varphi } \right) ^{2}P_{2,0} +2\sin \varphi \left( {1-\sin \varphi } \right) P_{2,1}\nonumber \\&+\,2\cos \varphi \left( {1-\cos \varphi } \right) P_{2,2} +\left( {1-\cos \varphi } \right) ^{2}P_{2,3} ,\end{aligned}$$
(8)
$$\begin{aligned} P_3&= \left( {1-\sin \varphi } \right) ^{2}P_{3,0} +2\sin \varphi \left( {1-\sin \varphi } \right) P_{3,1}\nonumber \\&+\,2\cos \varphi \left( {1-\cos \varphi } \right) P_{3,2} +\left( {1-\cos \varphi } \right) ^{2}P_{3,3}, \end{aligned}$$
(9)
$$\begin{aligned} P_{0,0}&= F_{i,j} ,P_{0,1} =F_{i,j} +\frac{\hat{{h}}_j F_{i,j}^y }{\pi \hat{{\alpha }}_{i,j}},\\ P_{0,2}&= F_{i,j+1} -\frac{\hat{{h}}_j F_{i,j+1}^y }{\pi \hat{{\beta }}_{i,j} },P_{0,3} =F_{i,j+1} ,\\ P_{1,0}&= F_{i,j} +\frac{h_i F_{i,j}^x }{\pi \alpha _{i,j} },\\ P_{1,1}&= \left( {F_{i,j} +\frac{h_i F_{i,j}^x }{\pi \alpha _{i,j} }} \right) +\frac{\hat{{h}}_j }{\pi \hat{{\alpha }}_{i,j} }\left( {F_{i,j}^y +\frac{h_i F_{i,j}^{xy} }{\pi \alpha _{i,j} }} \right) ,\\ P_{1,2}&= \left( {F_{i,j+1} +\frac{h_i F_{i,j+1}^x }{\pi \alpha _{i,j} }} \right) \\&-\frac{\hat{{h}}_j }{\pi \hat{{\beta }}_{i,j} }\left( {F_{i,j+1}^y +\frac{h_i F_{i,j+1}^{xy} }{\pi \alpha _{i,j} }} \right) ,\\ P_{1,3}&= F_{i,j+1} +\frac{h_i F_{i,j+1}^x }{\pi \alpha _{i,j} }, P_{2,0}=F_{i+1,j} -\frac{h_i F_{i+1,j}^x }{\pi \beta _{i,j}},\\ P_{2,1}&= \left( {F_{i+1,j} -\frac{h_i F_{i+1,j}^x }{\pi \beta _{i,j} }} \right) \\&+\frac{\hat{{h}}_j }{\pi \hat{{\alpha }}_{i,j} }\left( {F_{i+1,j}^y -\frac{h_i F_{i+1,j}^{xy} }{\pi \beta _{i,j} }}\right) ,\\ P_{2,2}&= \left( {F_{i+1,j+1} -\frac{h_i F_{i+1,j+1}^x }{\pi \beta _{i,j} }} \right) \\&-\frac{\hat{{h}}_j }{\pi \hat{{\beta }}_{i,j} }\left( {F_{i+1,j+1}^y -\frac{h_i F_{i+1,j+1}^{xy} }{\pi \beta _{i,j} }} \right) ,\\ P_{2,3}&= F_{i+1,j+1} -\frac{h_i F_{i+1,j+1}^x }{\pi \beta _{i,j} },P_{3,0} =F_{i+1,j},\\ P_{3,1}&= F_{i+1,j} +\frac{\hat{{h}}_j F_{i+1,j}^y }{\pi \hat{{\alpha }}_{i,j} }, P_{3,2}=F_{i+1,j+1} -\frac{\hat{{h}}_j F_{i+1,j+1}^y }{\pi \hat{{\beta }}_{i,j} },\\ P_{3,3}&= F_{i+1,j+1}. \end{aligned}$$

Remark 1

The bi-quadratic trigonometric function \(S\left( {x,y} \right) ,\) defined in (4), has the following properties over each rectangular patch \(I_{i,j} =\left[ {x_i ,x_{i+1} } \right] \times \left[ {y_j ,y_{j+1} } \right] ;\,i=0,1,2,\ldots ,m-1; \, j=0,1,2,\ldots ,n-1:\)

$$\begin{aligned} S\left( {x_i ,y_j } \right)&= F_{i,j} ,S\left( {x_{i+1} ,y_j } \right) =F_{i+1,j} ,\end{aligned}$$
(10a)
$$\begin{aligned} S\left( {x_i ,y_{j+1} } \right)&= F_{i,j+1} ,S\left( {x_{i+1} ,y_{j+1} } \right) \nonumber \\&= F_{i+1,j+1}, \end{aligned}$$
(10b)
$$\begin{aligned} \left. {\frac{\partial S\left( {x,y} \right) }{\partial x}} \right| _{\left( {x_i ,y_j } \right) }&= \frac{F_{i,j}^x }{\alpha _{i,j} },\left. {\frac{\partial S\left( {x,y} \right) }{\partial x}} \right| _{\left( {x_i ,y_{j+1} } \right) }\nonumber \\&= \frac{F_{i,j+1}^x }{\alpha _{i,j} },\end{aligned}$$
(10c)
$$\begin{aligned} \left. {\frac{\partial S\left( {x,y} \right) }{\partial x}} \right| _{\left( {x_{i+1} ,y_j } \right) }&= \frac{F_{i+1,j}^x }{\beta _{i,j} },\left. {\frac{\partial S\left( {x,y} \right) }{\partial x}} \right| _{\left( {x_{i+1} ,y_{j+1} } \right) }\nonumber \\&= \frac{F_{i+1,j+1}^x }{\beta _{i,j} },\end{aligned}$$
(10d)
$$\begin{aligned} \left. {\frac{\partial S\left( {x,y} \right) }{\partial y}} \right| _{\left( {x_i ,y_j } \right) }&= \frac{F_{i,j}^y }{\hat{{\alpha }}_{i,j} },\left. {\frac{\partial S\left( {x,y} \right) }{\partial y}} \right| _{\left( {x_i ,y_{j+1} } \right) }\nonumber \\&= \frac{F_{i,j+1}^y }{\hat{{\alpha }}_{i,j} },\end{aligned}$$
(10e)
$$\begin{aligned} \left. {\frac{\partial S\left( {x,y} \right) }{\partial y}} \right| _{\left( {x_{i+1} ,y_j } \right) }&= \frac{F_{i+1,j}^y }{\hat{{\beta }}_{i,j} },\left. {\frac{\partial S\left( {x,y} \right) }{\partial y}} \right| _{\left( {x_{i+1} ,y_{j+1} } \right) }\nonumber \\&= \frac{F_{i+1,j+1}^y }{\hat{{\beta }}_{i,j} }. \end{aligned}$$
(10f)

It is clear from (10a)–(10f), that the bi-quadratic trigonometric function defined in (4) interpolates the data values \((F_{k,l} ,k=i,i+1;l=j,j+1)\) but does not interpolate the partial derivatives \((F_{k,l}^x ,F_{k,l}^y ,k=i,i+1;l=j,j+1)\) at the four corners of the rectangular patch. Since \(\alpha _{i,j} ,\beta _{i,j} ,\hat{{\alpha }}_{i,j} \) and \(\hat{{\beta }}_{i,j} \) are the positive real numbers, thus it follows from (10a)–(10f), that the partial derivatives of the interpolating function (4), \(\left( {\frac{\partial S\left( {x,y} \right) }{\partial x},\frac{\partial S\left( {x,y} \right) }{\partial y}} \right) \) are the positive multiple of \(F_{k,l}^x ,F_{k,l}^y ,k=i,i+1;l=j,j+1.\) These observations lead to the conclusion that the bi-quadratic trigonometric function \(S\left( {x,y} \right) ,\) defined in (4), interpolates the data values and the direction of the derivative data \(F_{k,l}^x ,F_{k,l}^y ,k=i,i+1;l=j,j+1\) but does not preserve the magnitude of the derivatives. Hence by the Definition 2, the \(S\left( {x,y} \right) \) is \(GC^{1}\) continuous over the rectangular patch \(I_{i,j} =\left[ {x_i ,x_{i+1} } \right] \times \left[ {y_j ,y_{j+1} } \right] ,i=0,1,2,\ldots ,m-1;j=0,1,2,\ldots ,n-1.\)

Now, the \(GC^{1}\) continuity of the bi-quadratic trigonometric function (4) along the boundary curves (linkage curves) of the two adjacent surface patches is to be discussed.

$$\begin{aligned}&\left. {\frac{\partial S_{i,j} \left( {x_{i+1} ,y} \right) }{\partial x}} \right| _{\theta =\pi /2} \nonumber \\&\quad =\frac{1}{\beta _{i,j} }\left\{ {\left( {1-\sin \varphi } \right) ^{2}} \right. F_{i+1,j}^x\nonumber \\&\quad \quad +\, 2\left( {1-\sin \varphi }\right) \sin \varphi \times \left( {F_{i+1,j}^x +\frac{\hat{{h}}_j F_{i+1,j}^{xy} }{\pi \hat{{\alpha }}_{i,j} }} \right) \nonumber \\&\quad \quad +\, 2\left( {1-\cos \varphi } \right) \cos \varphi \left( {F_{i+1,j+1}^x -\frac{\hat{{h}}_j F_{i+1,j+1}^{xy} }{\pi \hat{{\beta }}_{i,j} }} \right) \nonumber \\&\quad \quad +\left( {1-\cos \varphi } \right) ^{2}\times \left. {F_{i+1,j+1}^x } \right\} .\end{aligned}$$
(11a)
$$\begin{aligned}&\left. {\frac{\partial S_{i+1,j} \left( {x_{i+1} ,y} \right) }{\partial x}} \right| _{\theta =0} \nonumber \\&\quad =\frac{1}{\alpha _{i+1,j} }\left\{ {\left( {1-\sin \varphi } \right) ^{2}} \right. F_{i+1,j}^x\nonumber \\&\quad \quad +\, 2\left( {1-\sin \varphi } \right) \sin \varphi \times \left( {F_{i+1,j}^x +\frac{\hat{{h}}_j F_{i+1,j}^{xy} }{\pi \hat{{\alpha }}_{i+1,j} }} \right) \nonumber \\&\quad \quad +\, 2\left( {1-\cos \varphi } \right) \cos \varphi \left( {F_{i+1,j+1}^x -\frac{\hat{{h}}_j F_{i+1,j+1}^{xy} }{\pi \hat{{\beta }}_{i+1,j} }} \right) \nonumber \\&\quad \quad +\,\left( {1-\cos \varphi } \right) ^{2}\times \left. {F_{i+1,j+1}^x } \right\} . \end{aligned}$$
(11b)
$$\begin{aligned}&\left. {\frac{\partial S_{i-1,j} \left( {x_i ,y} \right) }{\partial x}} \right| _{\theta =\pi /2} \nonumber \\&\quad =\frac{1}{\beta _{i-1,j} }\left\{ {\left( {1-\sin \varphi } \right) ^{2}} \right. F_{i,j}^x\nonumber \\&\quad \quad +\, 2\left( {1-\sin \varphi } \right) \sin \varphi \times \left( {F_{i,j}^x +\frac{\hat{{h}}_j F_{i,j}^{xy} }{\pi \hat{{\alpha }}_{i-1,j} }} \right) \nonumber \\&\quad \quad +\, 2\left( {1-\cos \varphi } \right) \cos \varphi \left( {F_{i,j+1}^x -\frac{\hat{{h}}_j F_{i,j+1}^{xy} }{\pi \hat{{\beta }}_{i-1,j} }} \right) \nonumber \\&\quad \quad +\,\left( {1-\cos \varphi } \right) ^{2}\times \left. {F_{i,j+1}^x } \right\} .\end{aligned}$$
(11c)
$$\begin{aligned}&\left. {\frac{\partial S_{i,j} \left( {x_i ,y} \right) }{\partial x}} \right| _{\theta =0} \nonumber \\&\quad =\frac{1}{\alpha _{i,j} }\left\{ {\left( {1-\sin \varphi } \right) ^{2}} \right. F_{i,j}^x\nonumber \\&\quad \quad +\, 2\left( {1-\sin \varphi } \right) \sin \varphi \times \left( {F_{i,j}^x +\frac{\hat{{h}}_j F_{i,j}^{xy} }{\pi \hat{{\alpha }}_{i,j} }} \right) \nonumber \\&\quad \quad +\, 2\left( {1-\cos \varphi } \right) \cos \varphi \left( {F_{i,j+1}^x -\frac{\hat{{h}}_j F_{i,j+1}^{xy} }{\pi \hat{{\beta }}_{i,j} }} \right) \nonumber \\&\quad \quad +\left( {1-\cos \varphi } \right) ^{2}\times \left. {F_{i,j+1}^x } \right\} .\end{aligned}$$
(11d)
$$\begin{aligned}&\left. {\frac{\partial S_{i,j} \left( {x,y_{j+1} } \right) }{\partial y}} \right| _{\varphi =\pi /2} \nonumber \\&\quad =\frac{1}{\hat{{\beta }}_{i,j} }\left\{ {\left( {1-\sin \theta } \right) ^{2}} \right. F_{i,j+1}^y\nonumber \\&\quad \quad +\, 2\left( {1-\sin \theta } \right) \sin \theta \times \left( {F_{i,j+1}^y +\frac{h_i F_{i,j+1}^{xy} }{\pi \alpha _{i,j} }} \right) \nonumber \\&\quad \quad +\, 2\left( {1-\cos \theta } \right) \cos \theta \left( {F_{i+1,j+1}^y -\frac{h_i F_{i+1,j+1}^{xy} }{\pi \beta _{i,j} }} \right) \nonumber \\&\quad \quad +\left( {1-\cos \theta } \right) ^{2}\times \left. {F_{i+1,j+1}^y } \right\} . \end{aligned}$$
(11e)
$$\begin{aligned}&\left. {\frac{\partial S_{i,j+1} \left( {x,y_{j+1} } \right) }{\partial y}} \right| _{\varphi =0} \nonumber \\&\quad =\frac{1}{\hat{{\alpha }}_{i,j+1} }\left\{ {\left( {1-\sin \theta } \right) ^{2}} \right. F_{i,j+1}^y\nonumber \\&\quad \quad +\, 2\left( {1-\sin \theta } \right) \sin \theta \times \left( {F_{i,j+1}^y +\frac{h_i F_{i,j+1}^{xy} }{\pi \alpha _{i,j+1} }} \right) \nonumber \\&\quad \quad +\, 2\left( {1-\cos \theta } \right) \cos \theta \left( {F_{i+1,j+1}^y -\frac{h_i F_{i+1,j+1}^{xy} }{\pi \beta _{i,j+1} }} \right) \nonumber \\&\quad \quad +\left( {1-\cos \theta } \right) ^{2}\times \left. {F_{i+1,j+1}^y } \right\} .\end{aligned}$$
(11f)
$$\begin{aligned}&\left. {\frac{\partial S_{i,j-1} \left( {x,y_j } \right) }{\partial y}} \right| _{\varphi =\pi /2} \nonumber \\&\quad =\frac{1}{\hat{{\beta }}_{i,j-1} }\left\{ {\left( {1-\sin \theta } \right) ^{2}} \right. F_{i,j}^y\nonumber \\&\quad \quad + 2\left( {1-\sin \theta } \right) \sin \theta \times \left( {F_{i,j}^y +\frac{h_i F_{i,j}^{xy} }{\pi \alpha _{i,j-1} }} \right) \nonumber \\&\quad \quad + 2\left( {1-\cos \theta } \right) \cos \theta \left( {F_{i+1,j}^y -\frac{h_i F_{i+1,j}^{xy} }{\pi \beta _{i,j-1} }} \right) \nonumber \\&\quad \quad +\left( {1-\cos \theta } \right) ^{2}\times \left. {F_{i+1,j}^y } \right\} .\end{aligned}$$
(11g)
$$\begin{aligned}&\left. {\frac{\partial S_{i,j} \left( {x,y_j } \right) }{\partial y}} \right| _{\varphi =0} \nonumber \\&\quad =\frac{1}{\hat{{\alpha }}_{i,j} }\left\{ {\left( {1-\sin \theta } \right) ^{2}} \right. F_{i,j}^y\nonumber \\&+\, 2\left( {1-\sin \theta } \right) \sin \theta \times \left( {F_{i,j}^y +\frac{h_i F_{i,j}^{xy} }{\pi \alpha _{i,j} }} \right) \nonumber \\&+\, 2\left( {1-\cos \theta } \right) \cos \theta \left( {F_{i+1,j}^y -\frac{h_i F_{i+1,j}^{xy} }{\pi \beta _{i,j} }} \right) \nonumber \\&+\left( {1-\cos \theta } \right) ^{2}\times \left. {F_{i+1,j}^y } \right\} . \end{aligned}$$
(11h)

Here, the bi-quadratic trigonometric functions \(S_{i-1,j} (x,y)\) and \(S_{i+1,j} (x,y)\) are obtained by replacing \(i\) by \(i-1\) and \(i+1\) respectively in (4). The bi-quadratic trigonometric functions \(S_{i,j-1} (x,y)\) and \(S_{i,j+1} (x,y)\) are obtained by replacing \(j\) by \(j-1\) and \(j+1\) respectively in (4).

Since \(\varphi \in \left[ {0,\frac{\pi }{2}} \right] \) and the free parameters are the positive real numbers, so by comparing the coefficients of the trigonometric polynomials \(\left( {1-\sin \varphi } \right) ^{2}\), \(2\left( {1-\sin \varphi } \right) \sin \varphi \), \(2\left( {1-\cos \varphi } \right) \cos \varphi \) and \(\left( {1-\cos \varphi } \right) ^{2}\) in (11a), (11b), (11c) and (11d), it can be observed that the biquadratic trigonometric function \(S\left( {x,y} \right) \) defined in (4) satisfies the \(GC^{1}\) continuity conditions (3b) and (3c) along the vertical boundary curves.

Again, for \(\theta \in \left[ {0,\frac{\pi }{2}} \right] \) and the positive values of the free parameters, by the comparison of the coefficients of the trigonometric polynomials \(\left( {1-\sin \theta } \right) ^{2}\), \(2\left( {1-\sin \theta } \right) \sin \theta \), \(2\left( {1-\cos \theta } \right) \cos \theta \) and \(\left( {1-\cos \theta } \right) ^{2}\) in (11e), (11f), (11g) and (11h), it is conclulded that the interpolating function (4) satisfies the \(GC^{1}\) continuity conditions (3d) and (3e) along the horizontal boundary curves.

Thus, it can be concluded from the set of equations (10) and (11) that the bi-quadratic trigonometric interpolating function \(S\left( {x,y} \right) \) defined in (4) is not only \(GC^{1}\) continuous over the rectangular patches \(I_{i,j} \) but also along the boundary curves(linkage curves) of two adjacent surface patches. Thus the trigonometric interpolating (4) is \(GC^{1}\) continuous over the given rectangular domain \(D=\left[ {a,b} \right] \times \left[ {c,d} \right] \).

Remark 2

The \(GC^{1}\) bi-quadratic trigonometric interpolating function (4) is the extension of the \(GC^{1}\) quadratic trigonometric function [16]. The order of the approximation of the \(GC^{1}\) quadratic trigonometric function [16] is three. It follows from [20] that the order of the approximation of the \(GC^{1}\) trigonometric interpolant (4) is also three.

Remark 3

For the given values of the free parameters \(\left( {\alpha _{i,j} ,\beta _{i,j} ,\hat{{\alpha }}_{i,j} ,\hat{{\beta }}_{i,j} } \right) ,\) there exists a unique \(GC^{1}\) bi-quadratic trigonometric surface (4) interpolating the 3D surface data \(\tau =\left\{ \left( {x_i ,y_j ,F_{i,j} } \right) :i=0,1,2,\ldots ,m;j=0,1,2,\ldots ,n \right\} .\) For different values of the free parameters \(\left( \alpha _{i,j} ,\beta _{i,j} ,\hat{{\alpha }}_{i,j} ,\hat{{\beta }}_{i,j} \right) ,\) we shall get different \(GC^{1}\) bi-quadratic trigonometric surface (4) interpolating the data set \(\tau .\)

Remark 4

It is clear from the partition \(p_0 \) and \(p_1 \) of the given rectangular domain \(D=\left[ {a,b} \right] \times \left[ {c,d} \right] ,\) that the surface interpolated by the \(GC^{1}\) bi-quadratic trigonometric interpolant (4) always represents the graph of a function.

4 Shape-Preserving Trigonometric Surfaces

Positivity and monotonicity are the intrinsic properties of data. The solution of the certain partial differential equations e.g the lubrication equation, advection equation, partial differential equations arising in quantum semiconductor modelling, Euler equations of gas dynamics, Saint-Venant equations are always positive. The monotone data arises from the unsteady compressible flow problem. It is required that in the the graphical representations of the solutions of the above mentioned problems, the intrinsic shapes (positive and/or monotone) of the data should be conserved. The general bi-quadratic trigonometric function cannot preserve the shapes of data. In the following sections, numerical schemes are presented to preserve the positivity and monotonicity of the surface data.

4.1 Positivity-Preserving Trigonometric Surfaces

Let \(\left\{ {\left( {x_i ,y_j ,F_{i,j} } \right) :i=0,1,2,\ldots ,m;j=0,1,2,\ldots ,n} \right\} \) be a given set of positive data defined over the rectangular domain\(D=\left[ {a,b} \right] \times \left[ {c,d} \right] \) i.e. \(F_{i,j} >0,\,\forall i,j.\)

The \(GC^{1}\) bi-quadratic trigonometric function \(S\left( {x,y} \right) \) defined in (4) preserves positivity only if

$$\begin{aligned} S\left( {x_i,y_j}\right)&= F_{i,j} ;i=0,1,2,\ldots ,m;j=0,1,2,\ldots ,n; \\&S\left( {x,y} \right) >0, \quad \forall \left( {x,y} \right) \in D. \end{aligned}$$

\(S\left( {x,y} \right) >0,\,\forall \,\left( {x,y}\right) \in D,\) only if \(P_k >0,k=0,1,2,3\). \(P_k ,k=0,1,2,3\) have already been defined in Eqs. (6)–(9). The rest of this section develops constraints on the free parameters \(\left( {\alpha _{i,j} ,\beta _{i,j} ,\hat{{\alpha }}_{i,j} ,\hat{{\beta }}_{i,j} } \right) \) which generate positive \(P_k ,k=0,1,2,3\) for positive surfaces.

Since \(P_0 \) defined in Eq. (6) is the function of a single parameter \(\varphi \), so it has one of the following graphical representations:

  1. (i)

    \(P_0 \) is either increasing or decreasing, \(\forall \varphi \in \left[ {0,1} \right] \). Extrema lie at the end points of the interval \(\left[ {0,1} \right] \). In this case, if a minima lies at one of the end points then the maxima lies at the other.

  2. (ii)

    \(P_0 \) is concave over the whole interval \(\left[ {0,1} \right] .\) In this case, minima lie at the end points of the curve.

  3. (iii)

    \(P_0 \) is convex over the whole interval \(\left[ {0,1} \right] .\) In this case, local minimas lie in the interior i.e. at the points \(\varphi \in \left( {0,1} \right) .\)

  4. (iv)

    There are inflection points in the interval \(\left( {0,1} \right) \) (function changes it concavity). In this case, local extremas lie at the points \(\varphi \in \left( {0,1} \right) .\)

For the case (i) and (ii), \( P_0 \) is positive \(\forall \varphi \in \left[ {0,1} \right] ,\)if \(P_0 \) is positive at the end points of the interval \(\left[ {0,1} \right] .\) Since \(\left. {P_0 } \right| _{\varphi =0} =F_{i,j} \) and\(\left. {P_0 } \right| _{\varphi =1} =F_{i,j+1} ,\) so for the cases (i) and (ii), \(P_0 >0, \,\forall \varphi \in \left[ {0,1} \right] \).

For the other two cases, the critical points(points of relative minima or maxima) of \(P_0 \) are determined. Constraints are derived on the free parameters to develop positive \(P_0 .\)

Take \(\delta =\sin \varphi ,\mu =\cos \varphi .\) The \(P_0 \) defined in Eq. (6) is expressed as function of two parameters \(\delta \) and \(\mu \) as

$$\begin{aligned} P_0 \left( {\delta ,\mu } \right)&= \left( {1-\delta } \right) ^{2}P_{0,0} +\, 2\delta \left( {1-\delta } \right) P_{0,1}\nonumber \\&+\, 2\mu \left( {1-\mu } \right) P_{0,2} +\left( {1-\mu } \right) ^{2}P_{0,3} . \end{aligned}$$
(12)

Differentiating \(P_0 \) with respect to parameters \(\delta \) and \(\mu \), we have the following system of equations

$$\begin{aligned}&-\,2\left( {1-\delta } \right) P_{0,0} + 2\left( {1-\delta } \right) P_{0,1} -2\delta P_{0,1} =0,\end{aligned}$$
(13)
$$\begin{aligned}&-\,2\mu P_{0,2} + 2\left( {1-\mu } \right) P_{0,2} -2\left( {1-\mu } \right) P_{0,3} =0. \end{aligned}$$
(14)

Solving (13) and (14), the following critical points of \(P_0 \) are obtained:

$$\begin{aligned} \delta _0 =\frac{P_{0,0} -P_{0,1} }{P_{0,0} -2P_{0,1} }\quad \hbox {and}\quad \mu _0 =\frac{P_{0,3} -P_{0,2} }{P_{0,3} -2P_{0,2} }. \end{aligned}$$

Since \(\cos \theta , \sin \theta \in \left[ {0,1} \right] \), therefore we shall determine the values of the free parameters \(\left( {\alpha _{i,j} ,\beta _{i,j} ,\hat{{\alpha }}_{i,j} ,\hat{{\beta }}_{i,j} } \right) \) for which \(\delta _0 ,\mu _0 \in \left( {0,1} \right) \). \(\delta _0 >0\), if either (\(P_{0,0} -P_{0,1} >0\) and \(P_{0,0} -2P_{0,1} >0)\) or (\(P_{0,0} -P_{0,1} <0\) and \(P_{0,0} -2P_{0,1} <0)\).

\(P_{0,0}-P_{0,1} >0\) and \(P_{0,0} -2P_{0,1} >0\) if

$$\begin{aligned} \hat{{\alpha }}_{i,j} <-\frac{2\hat{{h}}_j F_{i,j}^y }{\pi F_{i,j} }. \end{aligned}$$

\(P_{0,0}-P_{0,1}<0\) and \(P_{0,0} -2P_{0,1} <0\) if

$$\begin{aligned} \hat{{\alpha }}_{i,j} >-\frac{2\hat{{h}}_j F_{i,j}^y }{\pi F_{i,j} }. \end{aligned}$$

\(\delta _0 <1\) if either (\(P_{0,0} -2P_{0,1} >0)\) or (\(P_{0,1} >0\)and \(P_{0,0} -2P_{0,1} <0)\).

\(P_{0,1} <0\) and \(P_{0,0} -2P_{0,1} >0\) if

$$\begin{aligned} \hat{{\alpha }}_{i,j} <-\frac{\hat{{h}}_j F_{i,j}^y }{\pi F_{i,j} }. \end{aligned}$$

\(P_{0,1} >0\) and \(P_{0,0} -2P_{0,1} <0\) if

$$\begin{aligned} \hat{{\alpha }}_{i,j} >-\frac{\hat{{h}}_j F_{i,j}^y }{\pi F_{i,j} }. \end{aligned}$$

Combining all the above information, \(\delta _0 \in \left( {0,1} \right) \) if

  1. (a)

    \(\hat{{\alpha }}_{i,j} <Min\left\{ {-\frac{\hat{{h}}_j F_{i,j}^y }{\pi F_{i,j} },-\frac{2\hat{{h}}_j F_{i,j}^y }{\pi F_{i,j} }} \right\} ,\) or

  2. (b)

    \(\hat{{\alpha }}_{i,j} >Max\left\{ {-\frac{\hat{{h}}_j F_{i,j}^y }{\pi F_{i,j} },-\frac{2\hat{{h}}_j F_{i,j}^y }{\pi F_{i,j} }} \right\} .\)

Moreover, \(\mu _0 >0\) if either (\(P_{0,3} -P_{0,2} >0\) and \(P_{0,3} -2P_{0,2} >0)\) or (\(P_{0,3} -P_{0,2} <0\) and \(P_{0,3} -2P_{0,2} <0)\).

\(P_{0,3} -P_{0,2} >0\) and \(P_{0,3} -2P_{0,2} >0\) if

$$\begin{aligned} \hat{{\beta }}_{i,j} <\frac{2\hat{{h}}_j F_{i,j+1}^y }{\pi F_{i,j+1} }. \end{aligned}$$

\(P_{0,3} -P_{0,2} <0\) and \(P_{0,3} -2P_{0,2} <0\) if

$$\begin{aligned} \hat{{\beta }}_{i,j} >\frac{2\hat{{h}}_j F_{i,j+1}^y }{\pi F_{i,j+1} }. \end{aligned}$$

Finally, \(\mu _0 <1\) if either (\(P_{0,2} <0\) and \(P_{0,3} -2P_{0,2} >0)\) or (\(P_{0,2} >0\) and \(P_{0,3} -2P_{0,2} <0).\)

\(P_{0,2} <0\) and \(P_{0,3} -2P_{0,2} >0\) if

$$\begin{aligned} \hat{{\beta }}_{i,j} <\frac{\hat{{h}}_j F_{i,j+1}^y }{\pi F_{i,j+1} }. \end{aligned}$$

\(P_{0,2} >0\) and \(P_{0,3} -2P_{0,2} <0\) if

$$\begin{aligned} \hat{{\beta }}_{i,j} >\frac{\hat{{h}}_j F_{i,j+1}^y }{\pi F_{i,j+1} }. \end{aligned}$$

Thus, \(\mu _0 \in \left( {0,1} \right) \) if

  1. (a)

    \(\hat{{\beta }}_{i,j} <Min\left\{ {\frac{\hat{{h}}_j F_{i,j+1}^y }{\pi F_{i,j+1} },\frac{2\hat{{h}}_j F_{i,j+1}^y }{\pi F_{i,j+1} }} \right\} ,\) or

  2. (b)

    \(\hat{{\beta }}_{i,j} >Max\left\{ {\frac{\hat{{h}}_j F_{i,j+1}^y }{\pi F_{i,j+1} },\frac{2\hat{{h}}_j F_{i,j+1}^y }{\pi F_{i,j+1} }} \right\} .\)

The value of \(P_0 \left( {\delta ,\mu } \right) \)at the critical point \(\left( {\delta _0 ,\mu _0 } \right) \) is

$$\begin{aligned} P_0 \left( {\delta _0 ,\mu _0 } \right)&= \left( {\frac{P_{0,1} }{P_{0,0} -2P_{0,1} }} \right) ^{2}\left( {2P_{0,1} -P_{0,0} } \right) \\&+\left( {\frac{P_{0,2} }{P_{0,3} -2P_{0,2} }} \right) ^{2}\left( {2P_{0,2} -P_{0,3} } \right) . \end{aligned}$$

\(P_0 \left( {\delta _0 ,\mu _0 } \right) >0\) only if \(2P_{0,1} -P_{0,0} >0\) and \(2P_{0,2} -P_{0,3} >0\).

Thus, \(P_0 \left( {\delta ,\mu } \right) >0,\) if

$$\begin{aligned} \hat{{\alpha }}_{i,j}&> Max\left\{ {0,-\frac{\hat{{h}}_j F_{i,j}^y }{\pi F_{i,j} },-\frac{2\hat{{h}}_j F_{i,j}^y }{\pi F_{i,j} }} \right\} ,\\ \hat{{\beta }}_{i,j}&> Max\left\{ {0,\frac{\hat{{h}}_j F_{i,j+1}^y }{\pi F_{i,j+1} },\frac{2\hat{{h}}_j F_{i,j+1}^y }{\pi F_{i,j+1} }} \right\} . \end{aligned}$$

Echoing the same procedure for \(P_k ,k=1,2,3\), which has been adopted for \(P_0 \), the sufficient conditions for the positivity of \(P_k ,k=1,2,3\) are derived.

\(P_1 \left( {\delta ,\mu } \right) >0\) if

$$\begin{aligned} \alpha _{i,j}&> Max\left\{ {0,-\frac{h_i F_{i,j}^x }{\pi F_{i,j} },-\frac{h_i F_{i,j+1}^x }{\pi F_{i,j+1} }} \right\} ,\\ \hat{{\alpha }}_{i,j}&> Max\left\{ 0,-\frac{\hat{{h}}_j \left( {\pi \alpha _{i,j} F_{i,j}^y +h_i F_{i,j}^{xy} } \right) }{\pi \left( {\pi \alpha _{i,j} F_{i,j} +h_i F_{i,j}^x } \right) }\right. ,\\&\left. -\frac{2\hat{{h}}_j \left( {\pi \alpha _{i,j} F_{i,j}^y +h_i F_{i,j}^{xy} } \right) }{\pi \left( {\pi \alpha _{i,j} F_{i,j} +h_i F_{i,j}^x } \right) } \right\} ,\\ \hat{{\beta }}_{i,j}&> Max\left\{ 0,\frac{\hat{{h}}_j \left( {\pi \alpha _{i,j} F_{i,j+1}^y +h_i F_{i,j+1}^{xy} } \right) }{\pi \left( {\pi \alpha _{i,j} F_{i,j+1} +h_i F_{i,j+1}^x } \right) }\right. ,\\&\left. \frac{2\hat{{h}}_j \left( {\pi \alpha _{i,j} F_{i,j+1}^y +h_i F_{i,j+1}^{xy} } \right) }{\pi \left( {\pi \alpha _{i,j} F_{i,j+1} +h_i F_{i,j+1}^x } \right) } \right\} . \end{aligned}$$

Similarly, \(P_2 \left( {\delta ,\mu } \right) \) is positive if

$$\begin{aligned} \beta _{i,j}&> Max\left\{ {0,\frac{h_i F_{i+1,j}^x }{\pi F_{i+1,j} },\frac{h_i F_{i+1,j+1}^x }{\pi F_{i+1,j+1} }} \right\} ,\\ \hat{{\alpha }}_{i,j}&> Max\left\{ 0,-\frac{\hat{{h}}_j \left( {\pi \beta _{i,j} F_{i+1,j}^y -h_i F_{i+1,j}^{xy} } \right) }{\pi \left( {\pi \beta _{i,j} F_{i+1,j} -h_i F_{i+1,j}^x } \right) },\right. \\&\left. -\frac{2\hat{{h}}_j \left( {\pi \beta _{i,j} F_{i+1,j}^y -h_i F_{i+1,j}^{xy} } \right) }{\pi \left( {\pi \beta _{i,j} F_{i+1,j} -h_i F_{i+1,j}^x } \right) } \right\} ,\\ \hat{{\beta }}_{i,j}&> Max\left\{ 0,\frac{\hat{{h}}_j \left( {\pi \beta _{i,j} F_{i+1,j+1}^y -h_i F_{i+1,j+1}^{xy} } \right) }{\pi \left( {\pi \beta _{i,j} F_{i+1,j+1} -h_i F_{i+1,j+1}^x } \right) },\right. \\&\left. \frac{2\hat{{h}}_j \left( {\pi \beta _{i,j} F_{i+1,j+1}^y -h_i F_{i+1,j+1}^{xy} } \right) }{\pi \left( {\pi \beta _{i,j} F_{i+1,j+1} -h_i F_{i+1,j+1}^x } \right) } \right\} . \end{aligned}$$

Finally, \(P_3 \left( {\delta ,\mu } \right) \) is positive if

$$\begin{aligned} \hat{{\alpha }}_{i,j}&> Max\left\{ {0,-\frac{\hat{{h}}_j F_{i+1,j}^y }{\pi F_{i+1,j} },-\frac{2\hat{{h}}_j F_{i+1,j}^y }{\pi F_{i+1,j} }} \right\} ,\\ \hat{{\beta }}_{i,j}&> Max\left\{ {0,\frac{\hat{{h}}_j F_{i+1,j+1}^y }{\pi F_{i+1,j+1} },\frac{2\hat{{h}}_j F_{i+1,j+1}^y }{\pi F_{i+1,j+1} }} \right\} . \end{aligned}$$

All the above discussion is summarized as:

Theorem 1

The \(GC^{1}\) bi-quadratic trigonometric interpolating function \(S\left( {x,y} \right) \), defined in Eq. (4), preserves the shape of the positive surface data \(\left\{ {\left( {x_i ,y_j ,F_{i,j} } \right) :}i=0,1,2,\ldots ,m;j=0,1,2,\ldots ,n \right\} ,\) if over each rectangular patch \(I_{i,j} \),\(i=0,1,2,\ldots ,m-1;\, j=0,1,2,\ldots ,n-1,\) the free parameters \(\left( {\alpha _{i,j} ,\beta _{i,j} ,\hat{{\alpha }}_{i,j} ,\hat{{\beta }}_{i,j} } \right) \) satisfy the following sufficient conditions:

$$\begin{aligned} \alpha _{i,j} >u_1 ,\beta _{i,j} >u_2 ,\hat{{\alpha }}_{i,j} >u_3 ,\hat{{\beta }}_{i,j} >u_4 , \end{aligned}$$

where,

$$\begin{aligned} u_1&= Max\left\{ {0,K_1 ,K_2 } \right\} ,u_2 =Max\left\{ {0,K_3 ,K_4 } \right\} , \\ u_3&= Max\left\{ {0,K_l ,l=5,6,7,\ldots ,12} \right\} ,\\ u_4&= Max\left\{ {0,K_l ,l=13,14,15,\ldots ,20} \right\} , \end{aligned}$$

and,

$$\begin{aligned} K_1&= -\frac{h_i F_{i,j}^x }{\pi F_{i,j} },K_2 =-\frac{h_i F_{i,j+1}^x }{\pi F_{i,j+1} },K_3 =\frac{h_i F_{i+1,j}^x }{\pi F_{i+1,j} },\\ K_4&= \frac{h_i F_{i+1,j+1}^x }{\pi F_{i+1,j+1} }, K_5 =-\frac{\hat{{h}}_j F_{i,j}^y }{\pi F_{i,j} },K_6 =-\frac{2\hat{{h}}_j F_{i,j}^y }{\pi F_{i,j} },\\ K_7&= -\frac{\hat{{h}}_j F_{i+1,j}^y }{\pi F_{i+1,j} },K_8 =-\frac{2\hat{{h}}_j F_{i+1,j}^y }{\pi F_{i+1,j} },\\ K_9&= -\frac{\hat{{h}}_j \left( {\pi \alpha _{i,j} F_{i,j}^y +h_i F_{i,j}^{xy} } \right) }{\pi \left( {\pi \alpha _{i,j} F_{i,j} +h_i F_{i,j}^x } \right) },\\ K_{10}&= -\frac{2\hat{{h}}_j \left( {\pi \alpha _{i,j} F_{i,j}^y +h_i F_{i,j}^{xy} } \right) }{\pi \left( {\pi \alpha _{i,j} F_{i,j} +h_i F_{i,j}^x } \right) }, \\ K_{11}&= -\frac{\hat{{h}}_j \left( {\pi \beta _{i,j} F_{i+1,j}^y -h_i F_{i+1,j}^{xy} } \right) }{\pi \left( {\pi \beta _{i,j} F_{i+1,j} -h_i F_{i+1,j}^x } \right) },\\ K_{12}&= -\frac{2\hat{{h}}_j \left( {\pi \beta _{i,j} F_{i+1,j}^y -h_i F_{i+1,j}^{xy} } \right) }{\pi \left( {\pi \beta _{i,j} F_{i+1,j} -h_i F_{i+1,j}^x } \right) }, \\ K_{13}&= \frac{\hat{{h}}_j F_{i,j+1}^y }{\pi F_{i,j+1} },K_{14} =\frac{2\hat{{h}}_j F_{i,j+1}^y }{\pi F_{i,j+1} },K_{15} =\frac{\hat{{h}}_j F_{i+1,j+1}^y }{\pi F_{i+1,j+1} },\\ K_{16}&= \frac{2\hat{{h}}_j F_{i+1,j+1}^y }{\pi F_{i+1,j+1} }, K_{17}=\frac{\hat{{h}}_j \left( {\pi \alpha _{i,j} F_{i,j+1}^y +h_i F_{i,j+1}^{xy} } \right) }{\pi \left( {\pi \alpha _{i,j} F_{i,j+1} +h_i F_{i,j+1}^x } \right) },\\ K_{18}&= \frac{2\hat{{h}}_j \left( {\pi \alpha _{i,j} F_{i,j+1}^y +h_i F_{i,j+1}^{xy} } \right) }{\pi \left( {\pi \alpha _{i,j} F_{i,j+1} +h_i F_{i,j+1}^x } \right) }, \\ K_{19}&= \frac{\hat{{h}}_j \left( {\pi \beta _{i,j} F_{i+1,j+1}^y -h_i F_{i+1,j+1}^{xy} } \right) }{\pi \left( {\pi \beta _{i,j} F_{i+1,j+1} -h_i F_{i+1,j+1}^x } \right) },\\ K_{20}&= \frac{2\hat{{h}}_j \left( {\pi \beta _{i,j} F_{i+1,j+1}^y -h_i F_{i+1,j+1}^{xy} } \right) }{\pi \left( {\pi \beta _{i,j} F_{i+1,j+1} -h_i F_{i+1,j+1}^x } \right) }. \\ \end{aligned}$$

The above constraints can be rearranged as:

$$\begin{aligned} \alpha _{i,j}&= m_{i,j} +u_1 ;\beta _{i,j} =n_{i,j} +u_2;\hat{{\alpha }}_{i,j}\\&= m_{i,j}^\prime +u_3 ;\hat{{\beta }}_{i,j} =n_{i,j}^\prime +u_4 . \end{aligned}$$

Here, \(m_{i,j} ,n_{i,j} ,m_{i,j}^\prime \) and \(n_{i,j}^\prime \) are the positive real numbers.

Algorithm 1

  • Step 1. Pass the positive data set \(\left\{ \left( {x_i ,y_j ,F_{i,j} } \right) :i\!=\!0,1,2,\ldots ,m;j=0,1,2,\ldots ,n \right\} \) as an input.

  • Step 2. Estimate the derivatives \(F_{i,j}^x ,F_{i,j}^y \) and \(F_{i,j}^{xy} \)at the corners of each rectangular patch \(I_{i,j} .\)

  • Step 3. Calculate the step lengths \(h_i \), \(\hat{{h}}_j \), \(i=0,1,2,\ldots ,m-1; j=0,1,2,\ldots ,n-1\) and the normalized variables \(\vartheta \) and \(\sigma \).

  • Step 4. Calculate the values of the shape-preserving parameters (\(\alpha _{i,j} ,\beta _{i,j} ,\hat{{\alpha }}_{i,j} ,\hat{{\beta }}_{i,j} )\) by the Theorem 1.

  • Step 5. Substitute the values of \(F_{i,j}\), \(F_{i,j}^x\), \(F_{i,j}^y\), \(F_{i,j}^{xy}\), \(h_i ,\hat{{h}}_j ,\vartheta ,\sigma ,\,\alpha _{i,j} ,\beta _{i,j} ,\hat{{\alpha }}_{i,j}\) and \(\hat{{\beta }}_{i,j} \) obtained in Step 1-Step 4 in the \(GC^{1}\) biquadratic trigonometric function (4) to obtain a positive surface by the interpolation of the positive surface data.

4.2 Monotonicity-Preserving Trigonometric Surfaces

Let \(\left\{ {\left( {x_i ,y_j ,F_{i,j} } \right) :i=0,1,2,\ldots ,m;j=0,1,2,\ldots ,n} \right\} \) be a given set of monotone data defined over the rectangular domain\(D=\left[ {a,b} \right] \times \left[ {c,d} \right] .\) It follows that the given 3D data have the following properties:

  1. (i)

    \(\Delta _{i,j} >0,\hat{{\Delta }}_{i,j} >0,\forall i,j,\)

  2. (ii)

    \(F_{i,j}^x >0,\,F_{i,j}^y >0,\; \forall i,j.\)

Here, \(\Delta _{i,j} =\frac{F_{i+1,j} -F_{i,j} }{h_i }\) and \(\hat{{\Delta }}_{i,j} =\frac{F_{i,j+1} -F_{i,j}}{\hat{h}_j}\).

The \(GC^{1}\) bi-quadratic trigonometric interpolating function (4) preserves monotonicity if

$$\begin{aligned} S\left( {x_i ,y_j } \right)&= F_{i,j} ;i=0,1,2,\ldots ,m;j=0,1,2,\ldots ,n; \\ S_x \left( {x,y} \right)&> 0,S_y \left( {x,y} \right) >0, \quad \forall \left( {x,y} \right) \in D. \end{aligned}$$

The first order partial derivatives of \(S\left( {x,y} \right) ,\) denoted by \(S_x \left( {x,y} \right) \) and \(S_y \left( {x,y} \right) \) are defined as:

$$\begin{aligned} S_x \left( {x,y} \right)&= \pi h_i^{-1} \left[ \cos \theta (1-\sin \theta )R_1 +\sin \theta \left( {1-\cos \theta } \right) R_2\right. \nonumber \\&\left. +\sin \theta \cos \theta R_3 \right] , \end{aligned}$$
(15)

where

$$\begin{aligned} R_1&= \left( {1-\sin \varphi } \right) ^{2}A_0 + 2\sin \varphi \left( {1-\sin \varphi } \right) A_1\nonumber \\&+\, 2\cos \varphi \left( {1-\cos \varphi } \right) A_2 +(1-\cos \varphi )^{2}A_3 ,\end{aligned}$$
(16)
$$\begin{aligned} R_2&= \left( {1-\sin \varphi } \right) ^{2}B_0 + 2\sin \varphi \left( {1-\sin \varphi } \right) B_1 \nonumber \\&+\, 2\cos \varphi \left( {1-\cos \varphi } \right) B_2 +(1-\cos \varphi )^{2}B_3 ,\end{aligned}$$
(17)
$$\begin{aligned} R_3&= \left( {1-\sin \varphi } \right) ^{2}C_0 + 2\sin \varphi \left( {1-\sin \varphi } \right) C_1\nonumber \\&+\, 2\cos \varphi \left( {1-\cos \varphi } \right) C_2 +(1-\cos \varphi )^{2}C_3 , \end{aligned}$$
(18)

with,

$$\begin{aligned} A_0&= \frac{F_{i,j}^x }{\pi \alpha _{i,j} },A_{1=} \frac{1}{\pi \alpha _{i,j} }\left( {F_{i,j}^x +\frac{\hat{{h}}_j }{\pi \hat{{\alpha }}_{i,j} }F_{i,j}^{xy} } \right) ,\nonumber \\ A_2&= \frac{1}{\pi \alpha _{i,j} }\left( {F_{i,j+1}^x -\frac{\hat{{h}}_j }{\pi \hat{{\beta }}_{i,j} }F_{i,j+1}^{xy} } \right) , \nonumber \\ A_3&= \frac{F_{i,j+1}^x }{\pi \alpha _{i,j} },B_0 =\frac{F_{i+1,j}^x }{\pi \beta _{i,j} },\nonumber \\ B_1&= \frac{1}{\pi \beta _{i,j} }\left( {F_{i+1,j}^x +\frac{\hat{{h}}_j }{\pi \hat{{\alpha }}_{i,j} }F_{i+1,j}^{xy} } \right) , \nonumber \\ B_2&= \frac{1}{\pi \beta _{i,j} }\left( {F_{i+1,j+1}^x -\frac{\hat{{h}}_j }{\pi \hat{{\beta }}_{i,j} }F_{i+1,j+1}^{xy} }\right) ,\nonumber \\ B_3&= \frac{F_{i+1,j+1}^x }{\pi \beta _{i,j} },C_0 =\Delta _{i,j} -\frac{F_{i+1,j}^x }{\pi \beta _{i,j} }-\frac{F_{i,j}^x }{\pi \alpha _{i,j} }, \nonumber \\ C_1&= \Delta _{i,j} -\frac{F_{i+1,j}^x }{\pi \beta _{i,j} }-\frac{F_{i,j}^x }{\pi \alpha _{i,j} }\nonumber \\&+\, \frac{\hat{{h}}_j }{\pi h_i \hat{{\alpha }}_{i,j} }\left( {F_{i+1,j}^y -F_{i,j}^y -\frac{h_i F_{i+1,j}^{xy} }{\pi \beta _{i,j} }+\frac{h_i F_{i,j}^{xy} }{\pi \alpha _{i,j} }} \right) , \nonumber \\ C_2&= \Delta _{i,j+1} -\frac{F_{i+1,j+1}^x }{\pi \beta _{i,j} }-\frac{F_{i,j+1}^x }{\pi \alpha _{i,j} }\nonumber \\&-\,\frac{\hat{{h}}_j }{\pi h_i \hat{{\beta }}_{i,j} }\left( {F_{i+1,j+1}^y \!-\!F_{i,j+1}^y \!-\!\frac{F_{i+1,j+1}^{xy} }{\pi \beta _{i,j} }\!-\!\frac{F_{i,j+1}^{xy} }{\pi \alpha _{i,j} }} \right) \!, \nonumber \\ C_3&= \Delta _{i,j+1} -\frac{F_{i+1,j+1}^x }{\pi \beta _{i,j} }-\frac{F_{i,j+1}^x }{\pi \alpha _{i,j} }. \nonumber \\ S_y&= \pi \hat{{h}}_j^{-1} \left[ (1-\sin \theta )^{2}R_4 +\, 2\sin \theta \left( {1-\sin \theta } \right) R_5\right. \nonumber \\&\left. +\, 2\cos \theta (1-\cos \theta )R_6 +(1-\cos \theta )^{2}R_7\right] , \end{aligned}$$
(19)

where

$$\begin{aligned} R_4&= \cos \,\varphi \left( {1-\sin \,\varphi } \right) D_0 +\sin \,\varphi \left( {1-\cos \varphi } \right) D_1\nonumber \\&+ \cos \varphi \sin \varphi D_2 ,\end{aligned}$$
(20)
$$\begin{aligned} R_5&= \cos \,\varphi \left( {1-\sin \,\varphi } \right) E_0 +\sin \,\varphi \left( {1-\cos \varphi } \right) E_1\nonumber \\&+\cos \varphi \sin \varphi E_2 ,\end{aligned}$$
(21)
$$\begin{aligned} R_6&= \cos \,\varphi \left( {1-\sin \,\varphi } \right) F_0 +\sin \,\varphi \left( {1-\cos \varphi } \right) F_1\nonumber \\&+\cos \varphi \sin \varphi F_2 ,\end{aligned}$$
(22)
$$\begin{aligned} R_7&= \cos \,\varphi \left( {1-\sin \,\varphi } \right) G_0 +\sin \,\varphi \left( {1-\cos \varphi } \right) G_1\nonumber \\&+\cos \varphi \sin \varphi G_2 , \end{aligned}$$
(23)

with

$$\begin{aligned} D_0&= \frac{F_{i,j}^y }{\pi \hat{{\alpha }}_{i,j} },D_1 \!=\!\frac{F_{i,j+1}^y }{\pi \hat{{\beta }}_{i,j} },D_2 =\hat{{\Delta }}_{i,j} -\frac{F_{i,j+1}^y }{\pi \hat{{\beta }}_{i,j} }- \frac{F_{i,j}^y }{\pi \hat{{\alpha }}_{i,j} },\\ E_0&= \frac{1}{\pi \hat{{\alpha }}_{i,j} }\left( {F_{i,j}^y +\frac{h_i }{\pi \alpha _{i,j} }F_{i,j}^{xy} } \right) ,\\ E_1&= \frac{1}{\pi \hat{{\beta }}_{i,j} }\left( {F_{i,j+1}^y + \frac{h_i }{\pi \alpha _{i,j} }F_{i,j+1}^{xy} } \right) ,\\ E_2&= \hat{{\Delta }}_{i,j} -\frac{F_{i,j}^y }{\pi \hat{{\alpha }}_{i,j} }-\frac{F_{i,j+1}^y }{\pi \hat{{\beta }}_{i,j} }+\frac{h_i \left( {F_{i,j+1}^x -F_{i,j}^x } \right) }{\pi \hat{{h}}_j \alpha _{i,j} }\\&- \frac{h_i }{\pi ^{2}\alpha _{i,j} }\left( {\frac{F_{i,j+1}^{xy} }{\hat{{\beta }}_{i,j} }+\frac{F_{i,j}^{xy} }{\hat{{\alpha }}_{i,j} }} \right) ,\\ F_0&= \frac{1}{\pi \hat{{\alpha }}_{i,j} }\left( {F_{i+1,j}^y -\frac{h_i }{\pi \beta _{i,j} }F_{i+1,j}^{xy} } \right) ,\\ F_1&= \frac{1}{\pi \hat{{\beta }}_{i,j} }\left( {F_{i+1,j+1}^y -\frac{h_i }{\pi \beta _{i,j} }F_{i+1,j+1}^{xy} } \right) ,\\ F_2&= \hat{{\Delta }}_{i+1,j} -\frac{F_{i+1,j+1}^y }{\pi \hat{{\beta }}_{i,j} }-\frac{F_{i+1,j}^y }{\pi \hat{{\alpha }}_{i,j}}\\&-\, \frac{h_i \left( {F_{i+1,j+1}^x -F_{i+1,j}^x } \right) }{\pi \hat{{h}}_j \beta _{i,j} }\\&+\, \frac{h_i }{\pi ^{2}\beta _{i,j} }\left( {\frac{F_{i+1,j}^{xy} }{\hat{{\alpha }}_{i,j} }+\frac{F_{i+1,j+1}^{xy} }{\hat{{\beta }}_{i,j} }} \right) ,\\ G_0&= \frac{F_{i+1,j}^y }{\pi \hat{{\alpha }}_{i,j} },G_1 =\frac{F_{i+1,j+1}^y }{\pi \hat{{\beta }}_{i,j} },\\ G_2&= \hat{{\Delta }}_{i+1,j} -\frac{F_{i+1,j+1}^y }{\pi \hat{{\beta }}_{i,j} }-\frac{F_{i+1,j}^y }{\pi \hat{{\alpha }}_{i,j} },\\ \theta ,&\varphi \in \left[ {0,\frac{\pi }{2}} \right] . \end{aligned}$$

From (15), \(S_x \left( {x,y} \right) >0, \,\forall \left( {x,y} \right) \in D\), if \(R_k >0,k=1,2,3\). The positivity of \(R_k ,k=4,5,6,7\) ascertain the positivity of \(S_y \left( {x,y} \right) \) defined in (19). Firstly, we shall develop constraints on the free parameters \(\left( {\alpha _{i,j} ,\beta _{i,j} ,\hat{{\alpha }}_{i,j} ,\hat{{\beta }}_{i,j} } \right) \) to develop a positive \(R_1 \) over the whole domain. Since \(R_1 \) defined in Eq. (15) is the function of a single parameter \(\varphi \), so it has at least one of the graphical representations ((i), (ii), (iii), (iv)) already discussed in Sect. 4.1.

$$\begin{aligned} R_1&= \left( {1-\sin \varphi } \right) ^{2}A_0 + 2\sin \varphi \left( {1-\sin \varphi } \right) A_1\\&+\, 2\cos \varphi \left( {1-\cos \varphi } \right) A_2 +(1-\cos \varphi )^{2}A_3. \end{aligned}$$

For case (i) and (ii),\(R_1 \)is positive \(\forall \varphi \in \left[ {0,1} \right] \)if \(R_1 >0\) at the endpoints of the interval \(\left[ {0,1} \right] .\)Since \(\left. {R_1 } \right| _{\varphi =0} =\frac{F_{i,j}^x }{\pi \alpha _{i,j} }\) and \(\left. {R_1}\right| _{\varphi =\frac{\pi }{2}} =\frac{F_{i,j+1}^x }{\pi \alpha _{i,j}}\), so for case (i) and (ii) \(R_1 >0,\,\forall \varphi \in \left[ {0,1} \right] \).

In the other two cases the critical points need to be calculated. \(R_1\) is rewritten as:

$$\begin{aligned} R_1 \left( {\delta ,\mu } \right)&= \left( {1-\delta } \right) ^{2}A_0 + 2\delta \left( {1-\delta } \right) A_1\\&+\, 2\mu \left( {1-\mu } \right) A_2 +(1-\mu )^{2}A_3 , \end{aligned}$$

where \(\delta =\sin \varphi ,\mu =\cos \varphi .\) The critical point of \(R_1\) are

$$\begin{aligned} \left( {\delta _1 ,\mu _1 } \right) =\left( {\frac{A_0 -A_1 }{A_0 -2A_1 },\frac{A_3 -A_2 }{A_3 -2A_2 }} \right) . \end{aligned}$$

As, \(\sin \varphi ,\cos \varphi \in \left[ {0,\frac{\pi }{2}} \right] ,\) so we shall determine the values of the free parameters \(\left( {\alpha _{i,j} ,\beta _{i,j} ,} \right. \left. {\hat{{\alpha }}_{i,j} ,\hat{{\beta }}_{i,j} } \right) \) for which \(\delta _1 ,\mu _1 \in \left( {0,1} \right) \).

\(\delta _1 >0\) if either (\(A_0 -A_1 >0\) and \(A_0 -2A_1 >\) 0) or (\(A_0 -A_1 <0\) and \(A_0 -2A_1<\) 0).

\(A_0 -A_1 >0\) and \(A_0 -2A_1>\) 0 if

$$\begin{aligned} \hat{{\alpha }}_{i,j} <-\frac{2\hat{{h}}_j F_{i,j}^{xy} }{\pi F_{i,j}^x }. \end{aligned}$$

\(\hbox {A}_0 -A_1 <0\) and \(A_0 -2A_1<\) 0 if

$$\begin{aligned} \hat{{\alpha }}_{i,j} >-\frac{2\hat{{h}}_j F_{i,j}^{xy} }{\pi F_{i,j}^x }. \end{aligned}$$

\(\delta _1 <1\) if either (\(A_1 <0\) and \(A_0 -2A_1 >0)\) or (\(A_1 >0\) and \(A_0 -2A_1 <0)\).

\(A_1 <0\) and \(A_0 -2A_1 >0\) if

$$\begin{aligned} \hat{{\alpha }}_{i,j} <-\frac{\hat{{h}}_j F_{i,j}^{xy} }{\pi F_{i,j}^x }. \end{aligned}$$

\(A_1 >0\) and \(A_0 -2A_1 <0\) if

$$\begin{aligned} \hat{{\alpha }}_{i,j} >-\frac{\hat{{h}}_j F_{i,j}^{xy} }{\pi F_{i,j}^x }. \end{aligned}$$

Thus, \(\delta _1 \in \left( {0,1} \right) \) if

$$\begin{aligned} 0<\hat{{\alpha }}_{i,j} <Min\left\{ {-\frac{\hat{{h}}_j F_{i,j}^{xy} }{\pi F_{i,j}^x },-\frac{2\hat{{h}}_j F_{i,j}^{xy} }{\pi F_{i,j}^x }} \right\} , \end{aligned}$$

or

$$\begin{aligned} \hat{{\alpha }}_{i,j} >Max\left\{ {0,-\frac{\hat{{h}}_j F_{i,j}^{xy} }{\pi F_{i,j}^x },-\frac{2\hat{{h}}_j F_{i,j}^{xy} }{\pi F_{i,j}^x }} \right\} . \end{aligned}$$

Similarly, \(\mu _1 >0\) if either (\(A_3 -A_2 >0\) and \(A_3 -2A_2 >0)\) or (\(A_3 -A_2 <0\) and \(A_3 -2A_2 <0)\).

\(A_3 -A_2 >0\) and \(A_3 -2A_2 >0\) if

$$\begin{aligned} \hat{{\beta }}_{i,j} <-\frac{2\hat{{h}}_j F_{i,j+1}^{xy} }{\pi F_{i,j+1}^x }. \end{aligned}$$

\(A_3 -A_2 <0\) and \(A_3 -2A_2 <0\) if

$$\begin{aligned} \hat{{\beta }}_{i,j} >-\frac{2\hat{{h}}_j F_{i,j+1}^{xy} }{\pi F_{i,j+1}^x }. \end{aligned}$$

Similarly,\(\mu _1 <1\) either (\(A_2 <0\) and \(A_3 -2A_2 >0)\) or (\(A_2 >0\)and \(A_3 -2A_2 <0).\)

\(A_2 <0\) and \(A_3 -2A_2 >0\) if

$$\begin{aligned} \hat{{\beta }}_{i,j} <\frac{\hat{{h}}_j F_{i,j+1}^{xy} }{\pi F_{i,j+1}^x }. \end{aligned}$$

\(A_2 >0\) and \(A_3 -2A_2 <0\) if

$$\begin{aligned} \hat{{\beta }}_{i,j} >\frac{\hat{{h}}_j F_{i,j+1}^{xy} }{\pi F_{i,j+1}^x }. \end{aligned}$$

The above discussion leads to the statement that \(\mu _1 \in \left( {0,1} \right) \) if

$$\begin{aligned} \hat{{\beta }}_{i,j} <Min\left\{ {-\frac{2\hat{{h}}_j F_{i,j+1}^{xy} }{\pi F_{i,j+1}^x },\frac{\hat{{h}}_j F_{i,j+1}^{xy} }{\pi F_{i,j+1}^x }} \right\} , \end{aligned}$$

or

$$\begin{aligned} \hat{{\beta }}_{i,j} >Max\left\{ {0,-\frac{2\hat{{h}}_j F_{i,j+1}^{xy} }{\pi F_{i,j+1}^x },\frac{\hat{{h}}_j F_{i,j+1}^{xy} }{\pi F_{i,j+1}^x }} \right\} . \end{aligned}$$

Since, there is only one critical point of \(R_1 ,\) so \(R_1 \) will be convex over the whole domain.

Consider,

$$\begin{aligned} R_1 \left( {\delta _1 ,\mu _1 } \right) =\frac{A_1^2 \left( {2A_1 -A_0 } \right) }{\left( {A_0 -2A_1 } \right) ^{2}}+\frac{A_2^2 \left( {2A_2 -A_3 } \right) }{\left( {A_3 -2A_2 } \right) ^{2}}. \end{aligned}$$
(24)

Frrom (24), \(R_1 \left( {\delta _1 ,\mu _1 } \right) >0\) if

$$\begin{aligned} 2A_1 -A_0 >0\,\hbox {and}\,2A_2 -A_3 >0. \end{aligned}$$

All the above discussion leads to the conclusion that \(R_1 \left( {\delta ,\mu } \right) >0\) if

$$\begin{aligned} \alpha _{i,j}&> 0,\\ \hat{{\alpha }}_{i,j}&> Max\left\{ {0,-\frac{\hat{{h}}_j F_{i,j}^{xy} }{\pi F_{i,j}^x },-\frac{2\hat{{h}}_j F_{i,j}^{xy} }{\pi F_{i,j}^x }} \right\} ,\\ \hat{{\beta }}_{i,j}&> Max\left\{ {0,\frac{2\hat{{h}}_j F_{i,j+1}^{xy} }{\pi F_{i,j+1}^x },\frac{\hat{{h}}_j F_{i,j+1}^{xy} }{\pi F_{i,j+1}^x }} \right\} . \end{aligned}$$

Similarly, \(R_2 \left( {\delta ,\mu } \right) >0\) if

$$\begin{aligned} \beta _{i,j}&> 0,\\ \hat{{\alpha }}_{i,j}&> Max\left\{ {0,-\frac{\hat{{h}}_j F_{i+1,j}^{xy} }{\pi F_{i+1,j}^x },-\frac{2\hat{{h}}_j F_{i+1,j}^{xy} }{\pi F_{i+1,j}^x }} \right\} ,\\ \hat{{\beta }}_{i,j}&> Max\left\{ {0,\frac{2\hat{{h}}_j F_{i+1,j+1}^{xy} }{\pi F_{i+1,j+1}^x },\frac{\hat{{h}}_j F_{i+1,j+1}^{xy} }{\pi F_{i+1,j+1}^x }} \right\} . \end{aligned}$$

Moreover, \(R_3 \left( {\delta ,\mu } \right) >0\) if

$$\begin{aligned} \hat{{\alpha }}_{i,j}&> 0,\hat{{\beta }}_{i,j} >0,\alpha _{i,j} =\beta _{i,j} , \\ \alpha _{i,j}&> Max\left\{ 0,\frac{F_{i+1,j}^x +F_{i,j}^x }{\pi \Delta _{i,j} },\frac{F_{i+1,j+1}^x +F_{i,j+1}^x }{\pi \Delta _{i,j+1} },\right. \nonumber \\&\left. \frac{h_i \left( {F_{i+1,j}^{xy} +F_{i,j}^{xy} } \right) }{\pi \left( {F_{i+1,j}^y -F_{i,j}^y } \right) },\frac{h_i \left( {F_{i+1,j+1}^{xy} +F_{i,j+1}^{xy} } \right) }{\pi \left( {F_{i+1,j+1}^y -F_{i,j+1}^y } \right) } \right\} . \end{aligned}$$

\(R_4 \left( {\delta ,\mu } \right) >0\) if

$$\begin{aligned} \hat{{\alpha }}_{i,j}&= \hat{{\beta }}_{i,j} , \\ W_1&< \hat{{\alpha }}_{i,j} <W_2, \end{aligned}$$

where

$$\begin{aligned} W_1&= Max\left\{ {0,\frac{F_{i,j}^y +F_{i,j+1}^y }{\pi \hat{{\Delta }}_{i,j} }} \right\} ,\\ W_2&= Min\left\{ \frac{2\left( {F_{i,j}^y +F_{i,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i,j} },\frac{\left( {2F_{i,j}^y +F_{i,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i,j} },\right. \\&\left. \frac{\left( {F_{i,j}^y + 2F_{i,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i,j} } \right\} . \end{aligned}$$

\(R_5 \left( {\delta ,\mu } \right) >0\) if

$$\begin{aligned} \alpha _{i,j}&> Max\left\{ {0,-\frac{h_i F_{i,j}^{xy} }{\pi F_{i,j}^y },-\frac{h_i F_{i,j+1}^{xy} }{\pi F_{i,j+1}^y }} \right\} ,\\ \hat{{\alpha }}_{i,j}&= \hat{{\beta }}_{i,j} ,\\ W_3&< \hat{{\alpha }}_{i,j} <W_4 , \end{aligned}$$

where

$$\begin{aligned} W_3&= Max\left\{ 0,\frac{\hat{{h}}_j \left( {F_{i,j+1}^{xy} +F_{i,j}^{xy} } \right) }{\pi \left( {F_{i,j+1}^x -F_{i,j}^x } \right) },\frac{\hat{{h}}_j \left( {2F_{i,j+1}^{xy} +F_{i,j}^{xy} } \right) }{\pi \left( {F_{i,j+1}^x -F_{i,j}^x } \right) }\right. ,\\&\left. \frac{\hat{{h}}_j \left( {F_{i,j+1}^{xy} + 2F_{i,j}^{xy} } \right) }{\pi \left( {F_{i,j+1}^x -F_{i,j}^x } \right) },\frac{2\hat{{h}}_j \left( {F_{i,j+1}^{xy} +F_{i,j}^{xy} } \right) }{\pi \left( {F_{i,j+1}^x -F_{i,j}^x } \right) } \right\} ,\\ W_4&= Min\left\{ \frac{2\left( {F_{i,j}^y +F_{i,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i,j} },\frac{\left( {F_{i,j}^y + 2F_{i,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i,j} },\right. \\&\left. \frac{\left( {2F_{i,j}^y +F_{i,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i,j} } \right\} . \end{aligned}$$

Similarly, \(R_6 \left( {\delta ,\mu } \right) >0\) if

$$\begin{aligned} \hat{{\alpha }}_{i,j}&> 0,\hat{{\beta }}_{i,j} >0,\beta _{i,j} >0,\hat{{\alpha }}_{i,j} =\hat{{\beta }}_{i,j} ,\\ \beta _{i,j}&> Max\left\{ {0,\frac{h_i F_{i+1,j}^{xy} }{\pi F_{i+1,j}^y },\frac{h_i F_{i+1,j+1}^{xy} }{\pi F_{i+1,j+1}^y }} \right\} ,\\ W_5&< \hat{{\alpha }}_{i,j} <W_6 , \end{aligned}$$

where

$$\begin{aligned} W_5&= Max\left\{ 0,\frac{\hat{{h}}_j \left( {F_{i+1,j+1}^{xy} +F_{i+1,j}^{xy} } \right) }{\pi \left( {F_{i+1,j+1}^x -F_{i+1,j}^x } \right) }\right. ,\nonumber \\&\left. \quad \frac{\hat{{h}}_j \left( {2F_{i+1,j+1}^{xy} +F_{i+1,j}^{xy} } \right) }{\pi \left( {F_{i+1,j+1}^x -F_{i+1,j}^x } \right) },\frac{\hat{{h}}_j \left( {F_{i+1,j+1}^{xy} + 2F_{i+1,j}^{xy} } \right) }{\pi \left( {F_{i+1,j+1}^x -F_{i+1,j}^x } \right) }\right. ,\nonumber \\&\left. \frac{2\hat{{h}}_j \left( {F_{i+1,j+1}^{xy} +F_{i+1,j}^{xy} } \right) }{\pi \left( {F_{i+1,j+1}^x -F_{i+1,j}^x } \right) }\right\} ,\\ W_6&= Min\left\{ \frac{2\left( {F_{i+1,j}^y +F_{i+1,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i+1,j} },\frac{\left( {F_{i+1,j}^y + 2F_{i+1,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i+1,j} }\right. ,\nonumber \\&\left. \frac{\left( {2F_{i+1,j}^y +F_{i+1,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i+1,j} } \right\} . \end{aligned}$$

Similarly, \(R_7 \left( {\delta ,\mu } \right) >0\) if

$$\begin{aligned} \hat{{\alpha }}_{i,j}&= \hat{{\beta }}_{i,j} ,\\ W_7&< \hat{{\alpha }}_{i,j} <W_8 , \end{aligned}$$
Table 1 A 3D positive data set
Fig. 2
figure 2

\(GC^{1}\) bi-quadratic trigonometric function with \(\alpha _{i,j} =1,\beta _{i,j} =0.9,\hat{{\alpha }}_{i,j} =1, \hat{{\beta }}_{i,j} =0.9\)

Fig. 3
figure 3

The \(xz\)-view of Fig. 2

where

$$\begin{aligned} W_7&= Max\left\{ {0,\frac{F_{i+1,j}^y +F_{i+1,j+1}^y }{\pi \hat{{\Delta }}_{i+1,j} }} \right\} ,\\ W_8&= Min\left\{ \frac{2\left( {F_{i+1,j}^y +F_{i+1,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i+1,j} },\frac{\left( {2F_{i+1,j}^y +F_{i+1,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i+1,j} }\right. ,\nonumber \\&\left. \frac{\left( {F_{i+1,j}^y + 2F_{i+1,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i+1,j} } \right\} . \end{aligned}$$

The preceeding formulation is summed up as the following theorem:

Fig. 4
figure 4

The \(yz\)-view of Fig. 2

Fig. 5
figure 5

The positive \(GC^{1}\) bi-quadratic trigonometric function

Fig. 6
figure 6

The \(xz\)-view of Fig. 5

Fig. 7
figure 7

The \(yz\)-view of Fig. 5

Table 2 A 3D positive data set

Theorem 2

The \(GC^{1}\) bi-quadratic trigonometric interpolating function \(S\left( {x,y} \right) \), defined in Eq. (4), preserves the shape of the monotone surface data \(\left\{ {\left( {x_i ,y_j ,F_{i,j} } \right) :}i=0,1,2,\ldots ,m;j=0,1,2,\ldots ,n \right\} \), if over each rectangular patch \(I_{i,j} \),\(i=0,1,2,\ldots ,m-1;\,j=0,1,2,\ldots ,n-1,\) the free parameters \(\left( {\alpha _{i,j} ,\beta _{i,j} ,\hat{{\alpha }}_{i,j} ,\hat{{\beta }}_{i,j} } \right) \) satisfy the following sufficient conditions:

$$\begin{aligned} \alpha _{i,j} >v_1 ,v_2 <\hat{{\alpha }}_{i,j} <v_3 , \end{aligned}$$

where,

$$\begin{aligned}&v_1=Max\left\{ {0,\hat{{K}}_l ,l=1,2,3,\ldots ,8} \right\} ,\\&v_2=Max\left\{ {0,\hat{{K}}_l ,l=9,10,11,\ldots ,26} \right\} ,\\&v_3=Min\left\{ {\hat{{K}}_l ,l=27,28,29,30,31,32} \right\} , \\&\hat{{K}}_1=-\frac{h_i F_{i,j}^{xy} }{\pi F_{i,j}^y },\hat{{K}}_2 =-\frac{h_i F_{i,j+1}^{xy} }{\pi F_{i,j+1}^y },\hat{{K}}_3 =\frac{h_i F_{i+1,j}^{xy} }{\pi F_{i+1,j}^y },\\&\hat{{K}}_4=\frac{h_i F_{i+1,j+1}^{xy} }{\pi F_{i+1,j+1}^y },\hat{{K}}_5 =\frac{F_{i+1,j}^x +F_{i,j}^x }{\pi \Delta _{i,j} }\\&\hat{{K}}_6 =\frac{F_{i+1,j+1}^x +F_{i,j+1}^x }{\pi \Delta _{i,j+1} },\hat{{K}}_7 =\frac{h_i \left( {F_{i+1,j}^{xy} +F_{i,j}^{xy} } \right) }{\pi \left( {F_{i+1,j}^y -F_{i,j}^y } \right) },\\&\hat{{K}}_8=\frac{h_i \left( {F_{i+1,j+1}^{xy} +F_{i,j+1}^{xy} } \right) }{\pi \left( {F_{i+1,j+1}^y -F_{i,j+1}^y } \right) }, \hat{{K}}_9=-\,\frac{\hat{{h}}_j F_{i,j}^{xy} }{\pi F_{i,j}^x},\\&\hat{{K}}_{10}=-\frac{2\hat{{h}}_j F_{i,j}^{xy} }{\pi F_{i,j}^x },\hat{{K}}_{11} =\frac{2\hat{{h}}_j F_{i,j+1}^{xy} }{\pi F_{i,j+1}^x },\hat{{K}}_{12} =\frac{\hat{{h}}_j F_{i,j+1}^{xy} }{\pi F_{i,j+1}^x },\\&\hat{{K}}_{13}=-\frac{\hat{{h}}_j F_{i+1,j}^{xy} }{\pi F_{i+1,j}^x } \hat{{K}}_{14}=-\frac{2\hat{{h}}_j F_{i+1,j}^{xy} }{\pi F_{i+1,j}^x },\hat{{K}}_{15} =\frac{2\hat{{h}}_j F_{i+1,j+1}^{xy} }{\pi F_{i+1,j+1}^x },\\&\hat{{K}}_{16}=\frac{\hat{{h}}_j F_{i+1,j+1}^{xy} }{\pi F_{i+1,j+1}^x },\hat{{K}}_{17} =\frac{F_{i,j}^y +F_{i,j+1}^y }{\pi \hat{{\Delta }}_{i,j} } \end{aligned}$$
Fig. 8
figure 8

\(GC^{1}\) bi-quadratic trigonometric function with \(\alpha _{i,j} =0.5,\beta _{i,j} =0.6,\hat{{\alpha }}_{i,j} =0.5,\hat{{\beta }}_{i,j} =0.6\)

Fig. 9
figure 9

The \(xz\)-view of Fig. 8

$$\begin{aligned} \hat{{K}}_{18}&= \frac{\hat{{h}}_j \left( {F_{i,j+1}^{xy} +F_{i,j}^{xy} } \right) }{\pi \left( {F_{i,j+1}^x -F_{i,j}^x } \right) },\hat{{K}}_{19} =\frac{\hat{{h}}_j \left( {2F_{i,j+1}^{xy} +F_{i,j}^{xy} } \right) }{\pi \left( {F_{i,j+1}^x -F_{i,j}^x } \right) },\\ \hat{{K}}_{20}&= \frac{\hat{{h}}_j \left( {F_{i,j+1}^{xy} + 2F_{i,j}^{xy} } \right) }{\pi \left( {F_{i,j+1}^x -F_{i,j}^x }\right) } \hat{{K}}_{21} =\frac{2\hat{{h}}_j \left( {F_{i,j+1}^{xy} +F_{i,j}^{xy} } \right) }{\pi \left( {F_{i,j+1}^x -F_{i,j}^x }\right) },\\ \hat{{K}}_{22}&= \frac{\hat{{h}}_j \left( {F_{i+1,j+1}^{xy} +F_{i+1,j}^{xy} } \right) }{\pi \left( {F_{i+1,j+1}^x -F_{i+1,j}^x } \right) }, \hat{{K}}_{23}=\frac{\hat{{h}}_j \left( {2F_{i+1,j+1}^{xy} +F_{i+1,j}^{xy} } \right) }{\pi \left( {F_{i+1,j+1}^x -F_{i+1,j}^x } \right) },\\ \hat{{K}}_{24}&= \frac{\hat{{h}}_j \left( {F_{i+1,j+1}^{xy} + 2F_{i+1,j}^{xy} } \right) }{\pi \left( {F_{i+1,j+1}^x -F_{i+1,j}^x }\right) }, \hat{{K}}_{25}=\frac{2\hat{{h}}_j \left( {F_{i+1,j+1}^{xy} +F_{i+1,j}^{xy} } \right) }{\pi \left( {F_{i+1,j+1}^x -F_{i+1,j}^x } \right) }\!, \end{aligned}$$
Fig. 10
figure 10

The \(yz\)-view of Fig. 8

Fig. 11
figure 11

The positive \(GC^{1}\) bi-quadratic trigonometric function

Fig. 12
figure 12

The \(xz\)-view of Fig. 11

Fig. 13
figure 13

The \(yz\)-view of Fig. 11

Table 3 A 3D monotone data set
$$\begin{aligned} \hat{{K}}_{26}&= \frac{F_{i+1,j}^y +F_{i+1,j+1}^y }{\pi \hat{{\Delta }}_{i+1,j} },\hat{{K}}_{27}=\frac{2\left( {F_{i,j}^y +F_{i,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i,j} },\\ \hat{{K}}_{28}&= \frac{\left( {2F_{i,j}^y +F_{i,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i,j} },\hat{{K}}_{29}=\frac{\left( {F_{i,j}^y + 2F_{i,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i,j} },\\ \end{aligned}$$
$$\begin{aligned} \hat{{K}}_{30}&= \frac{2\left( {F_{i+1,j}^y +F_{i+1,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i+1,j}}, \hat{{K}}_{31}=\frac{\left( {F_{i+1,j}^y + 2F_{i+1,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i+1,j} },\\ \hat{{K}}_{32}&= \frac{\left( {2F_{i+1,j}^y +F_{i+1,j+1}^y } \right) }{\pi \hat{{\Delta }}_{i+1,j} }, \end{aligned}$$

and, \(\hat{{\beta }}_{i,j} =\hat{{\alpha }}_{i,j}\), \(\beta _{i,j}=\alpha _{i,j}\).

Fig. 14
figure 14

\(GC^{1}\) bi-quadratic trigonometric function with \(\alpha _{i,j} =0.2,\beta _{i,j} =3,\hat{{\alpha }}_{i,j} =1.6,\hat{{\beta }}_{i,j} =1\)

Fig. 15
figure 15

The \(xz\)-view of Fig. 14

Fig. 16
figure 16

The \(yz\)-view of Fig. 14

The above constraints can be rearranged as:

$$\begin{aligned} \alpha _{i,j} =w_{i,j} +v_1 ;\hat{{\alpha }}_{i,j} =\hat{{w}}_{i,j} +v_2 ; \end{aligned}$$

Here, \(w_{i,j} >\)0, \(\hat{{w}}_{i,j} >0\), and \(\hat{{w}}_{i,j} \) is choosen such that \(\hat{{w}}_{i,j} +v_2 <v_3 .\)

Fig. 17
figure 17

The monotone \(GC^{1}\) bi-quadratic trigonometric function

Fig. 18
figure 18

The \(xz\)-view of Fig. 17

Fig. 19
figure 19

The \(yz\)-view of Fig. 17

Algorithm 2

  • Step 1. Input the monotone data set \(\left\{ \left( {x_i ,y_j ,F_{i,j} } \right) :i=0,1,2,\ldots ,m;j=0,1,2,\ldots ,n \right\} \).

  • Step 2. Estimate the derivatives \(F_{i,j}^x ,F_{i,j}^y \) and \(F_{i,j}^{xy} \)at the corners of each rectangular patch \(I_{i,j} .\)

  • Step 3. Calculate \(h_i {\prime }s\), \(\hat{{h}}_j {\prime }s\), \(\vartheta \) and \(\sigma \).

  • Step 4. Calculate the values of the shape-preserving parameters (\(\alpha _{i,j} ,\beta _{i,j} ,\hat{{\alpha }}_{i,j} ,\hat{{\beta }}_{i,j} )\) using Theorem 2.

  • Step 5. Substitute the values of \(F_{i,j}\), \(F_{i,j}^x\), \(F_{i,j}^y\), \(F_{i,j}^{xy}\), \(h_i,\hat{{h}}_j,\vartheta ,\sigma \), \(\alpha _{i,j},\beta _{i,j} ,\hat{{\alpha }}_{i,j}\) and \(\hat{{\beta }}_{i,j} \) obtained in Step 1-Step 4 to the \(GC^{1}\) bi-quadratic trigonometric function (4) to obtain a monotone surface by the interpolation of a monotone surface data set.

5 Numerical Examples

In this section, the positivity and monotonicity preserving schemes developed in Sect. 4 are tested through some numerical positive and monotone 3D data sets.

Table 4 A 3D monotone data set
Fig. 20
figure 20

\(GC^{1}\) bi-quadratic trigonometric function with \(\alpha _{i,j} =1.3,\beta _{i,j} =0.4,\hat{{\alpha }}_{i,j} =1.99,\hat{{\beta }}_{i,j} =1.75\)

Fig. 21
figure 21

The \(xz\)-view of Fig. 20

Fig. 22
figure 22

The \(yz\)-view of Fig. 20

Fig. 23
figure 23

The monotone \(GC^{1}\) bi-quadratic trigonometric function

Fig. 24
figure 24

The \(xz\)-view of Fig. 23

Example 1

The positive data set, truncated up to four decimal places in Table 1, is produced from the positive function \(F\left( {x,y} \right) =\frac{x^{2}y^{2}\left( {x^{2}-y^{2}} \right) ^{4}}{\left( {x^{2}+y^{2}} \right) ^{4}}+5.\)

Fig. 25
figure 25

The \(yz\)-view of Fig. 23

Figure 2 is produced by interpolating the 3D positive data of Table 1 by the \(GC^{1}\) bi-quadratic trigonometric function (4) for the arbitrary values of the free parameters (\(\alpha _{i,j} =1,\beta _{i,j} =0.9, \,\hat{{\alpha }}_{i,j} =1, \,\hat{{\beta }}_{i,j} =0.9)\). Figure 3 and 4 are the \(xz\) and \(yz\) views of Fig. 2 respectively. Figs. 23 and 4 confirm that the \(GC^{1}\) interpolating function (4) is unable to preserve the positive shape of the data for the arbitrary selection of the parameters (\(\alpha _{i,j} ,\beta _{i,j} , \,\hat{{\alpha }}_{i,j} , \, \hat{{\beta }}_{i,j} )\). The positive data set of Table 1 is again interpolated by the \(GC^{1}\) bi-quadratic trigonometric function (4) but the values of the parameters (\(\alpha _{i,j} ,\beta _{i,j},\,\hat{{\alpha }}_{i,j},\,\hat{{\beta }}_{i,j} )\) are computed from the Theorem 1. The resulting positive surface for the positive data is shown in Fig. 5. The different views of the Fig. 5 are Figs. 6 and 7. Figures 56 and 7 convey that positivity-preserving scheme developed in Sect. 4 preserves the shape of the positive surface data smoothly.

Table 5 CPU times consumption of the shape-preserving numerical schemes
Table 6 Numerical results of Fig. 5
Table 7 Numerical results of Fig. 11
Table 8 Numerical results of Fig. 17
Table 9 Numerical results of Fig. 23

Example 2

The positive data set truncated up to four decimal places in Table 2 is generated from the positive function \(F\left( {x,y} \right) =e^{t},t=\cos \left( {x^{2}-\frac{0.1}{y^{2}}} \right) \).

The Fig. 8 is produced by interpolating the positive data set in Table 2 by the \(GC^{1}\) bi-quadratic trigonometric function (4) for the arbitrary values of the free parameters (\(\alpha _{i,j} =0.5,\beta _{i,j} =0.6,\,\hat{{\alpha }}_{i,j} =0.5,\, \hat{{\beta }}_{i,j} =0.6)\). Figures 9 and  10 are the different views of Fig. 8. Figures 89 and 10 state that the interpolating function (4) losses the positive shape of the data for the random choice of the free parameters. The positive surface in Fig. 11 is created by the positivity-preserving scheme developed in Sect. 4. Figures 12 and 13 are the different views of Fig. 11.

Example 3

The monotone data in Table 3 is generated from the monotone function \(F\left( {x,y} \right) =x^{2}+y^{2},\forall \left( {x,y} \right) \in \left[ {1,6} \right] \times \left[ {1,6} \right] \).

Figure 14 is produced by interpolating the monotone data set of Table 3 with the \(GC^{1}\) bi-quadratic trigonometric function (4). The values assigned to the free parameters are \(\alpha _{i,j} =0.2,\beta _{i,j} =3,\hat{{\alpha }}_{i,j} =1.6,\hat{{\beta }}_{i,j} =1.\) It is noted in Fig. 14 that the \(GC^{1}\) bi-quadratic trigonometric function (4) does not preserve the shape of the monotone data for the randomly selected values of the free parameters. The monotone data of the Table 2 is again interpolated in Fig. 17 by the monotonicity-preserving trigonometric scheme of Sect. 4. It is clear in Fig. 17 that the interpolated surface is monotone over the whole domain. Figures 15, 16, 18 and 19 are the different views of Figs. 14 and 17.

Example 4

The monotone data of Table 4 is generated by the absolute value function

$$\begin{aligned} F\left( {x,y} \right) =\left| x \right| +\left| y \right| ,\forall \left( {x,y} \right) \in \left[ {0.01,300} \right] \times \left[ {0.01,300} \right] . \end{aligned}$$

The Fig. 20 is the interpolation of the monotone data of Table 4 by the \(GC^{1}\) bi-quadratic trigonometric function (4) with (\(\alpha _{i,j} =1.3,\beta _{i,j} =0.4,\hat{{\alpha }}_{i,j} =1.99,\hat{{\beta }}_{i,j} =1.75)\). The trigonometric interpolant (4) has lost the monotonicity in Fig. 20 for this choice of the free parameters. The Fig. 21 (\(xz\)-view) and Fig. 22 (\(yz\)-view) of Fig. 20 confirm the assertion. Monotone surface produced by interpolating the monotone data of Table 4 by the monotonicity-preserving scheme of Sect. 4.2. The interpolated monotone surface is shown in Fig. 23. The \(xz\)-view and \(yz\)-view of Fig. 23 are the Figs. 24 and 25 respectively.

Remark 5

In all the above numerical examples, the partial derivatives \(F_{i,j}^x , \,F_{i,j}^y \) and \(F_{i,j}^{xy} \) at the data cites are computed by the derivative approximation scheme [15].

6 Conclusion

In this study, alternate schemes are developed to preserve the positive and monotone shapes of the 3D regular surface data. The proposed schemes use \(GC^{1}\) bi-quadratic trigonometric interpolating function (4) for interpolation. The ranges of the free parameters are worked out to preserve the shape of the data.

The shape-preserving interpolation schemes developed in this research paper are \(GC^{1},\)local, applicable to all sorts of data (uniform and non-uniform). The degree of the interpolant is unique over the whole domain. Smoothness of the interpolated shape-preserving surfaces is independent of the choice of the free parameters due to trigonometric basis functions.

The comparison of the CPU time consumption of the shape-preserving \(GC^{1}\) bi-quadratic trigonometric interpolation schemes developed in Sect. 4 to [15] and [14] is given in Table 5. Tables 6, 7, 8 and 9 are the numerical results of Figs. 5, 11, 17 and 23 respectively.