965
Views
5
CrossRef citations to date
0
Altmetric
Research Article

Construction new rational cubic spline with application in shape preservations

| (Reviewing editor)
Article: 1505175 | Received 03 May 2018, Accepted 23 Jul 2018, Published online: 07 Aug 2018

Abstract

This study considers the construction a new C 1 rational cubic spline (cubic numerator and quadratic denominator) with three parameters. Some mathematical properties of this rational function will be investigated in details. In order to use the proposed rational cubic spline for positivity preserving interpolation and constrained data that lie above any arbitrary straight line, the automatic choice of one parameter will be developed through some mathematical derivation. On each sub-interval this idea gives extra two free parameters that very useful for the user to manipulate the shape of the curve while at the same time maintaining the shape preservations of the data. Numerical comparison with some existing schemes shows that, the proposed scheme is on par. Furthermore, for some data sets, the proposed scheme is better as well as produce more visually pleasing interpolating curve for scientific visualization.

Subjects Classifications:

PUBLIC INTEREST STATEMENT

This study considers the construction a new C 1 rational cubic spline (cubic numerator and quadratic denominator) with three parameters. The proposed rational cubic spline is implemented for positivity preserving interpolation and constrained data that lie above any arbitrary straight line. This is achieved by finding the sufficient condition that will give the automatic choice of one parameter with two free parameters for shape modification while at the same time maintaining the shape preservation. Numerical comparison with some existing schemes shows that, the proposed scheme is on par where for some data sets, the proposed scheme is better as well as produce more visually pleasing interpolating curve for scientific visualization.

The presented scheme is useful in advancing the study in image interpolation and image compression by controlling the free parameters. Furthermore, for non-technical readers, the proposed scheme also applicable for the animation industry and we believe that it is better than the common cubic Bezier and cubic spline.

1. Introduction

When the experiments are conducted in the laboratory, usually the scientists will obtain a lot of raw data that represents the results for that experiment. For instance, in chemical experiment, the data might be distillation curve or in biochemistry, the data maybe the movement of the respective cell inside the system. Furthermore, in any experiments, there must be exists the error or noise in the data acquisition processes. The error can be either systematic or bias error or random error. These data are subject for other data processing techniques such as data fitting and data smoothing or filtering. If the data is clean i.e. most probably no error, then interpolation is a better option to the data. But if the data consist error or noise, the approximation and smoothing or denoizing might be useful for the purposes. The common methods for data processing are linear regression, polynomial regression (or fitting), any non-polynomial fitting, cubic spline, smoothing spline, etc. Besides that, recently, the approximation or interpolation of the data does require that the curve or surface must be also maintain the geometric shape of the data. For instance, the positive data is given, then the curve should be positive everywhere. Furthermore, if the data lie above an arbitrary straight line, then the resulting interpolating curve must lie above a straight line. Both geometric properties are important in the field of scientific visualization, since if we consider the probability of some measurements, then the negativity is clearly meaningless. Furthermore, the level of oxygen in the gas discharge is also a positive data (Brodlie, Asim, & Unsworth, Citation2005).

We divided the literature review into two parts i.e. positivity preserving interpolation and constrained data modelling, respectively. Many researchers have investigated positivity preserving interpolation by using polynomial cubic spline, rational splines or the trigonometric spline. For instance, Abbas, Majid, M.N. Hj, and Ali (Citation2012) have considered the constrained data interpolation for data lies above a straight line for curve and above a plane for surface interpolation. Their scheme has two free parameters that can be used to change the shape of the curve. Butt and Brodlie (Citation1993) discussed positivity preserving interpolation by extending the main idea from Fritsch and Carlson (Citation1980). Butt and Brodlie’s scheme requires the modification of the first derivatives as well as knots insertion on some sub-intervals in which the shape violation are found. Brodlie et al. (Citation2005) discussed the positivity preserving approximation and constrained data modelling by using Shepard’s family i.e. meshfree methods. To achieve shape preserving, some optimization problem need to be solved in order to find suitable parameters. Hussain and Ali (Citation2006) constructed positive curve by using rational cubic spline with two parameters. This idea has been extended by Hussain and Hussain (Citation2006) for positivity preserving interpolation and constrained interpolation (both for curve and surface, respectively). The main drawback for the schemes of Hussain and Ali (Citation2006) and Hussain and Hussain (Citation2006) are that both schemes have no free parameters to modify the shape of the curve, since the sufficient conditions are derived on all parameters that exists in the description of their rational cubic spline. Hussain, Hussain, and Samreen (Citation2008) implement rational quartic spline for positive and convex shape preserving interpolation. But based on our simulation, their scheme fails to preserves positivity of the data. Hussain and Sarfraz (Citation2008) consider the positivity shape preserving by using rational cubic spline of the form cubic/cubic with two free parameters. They obtain positive interpolating curve and surface. But for some data sets, the surface tends to be flat on some region. Karim and Kong (Citation2014) have constructed another version of rational cubic spline (cubic/quadratic) with two free parameters in each sub-interval that can be used to modify the shape of the curve. They show that their results are more visually pleasing than the scheme presented by Hussain and Hussain (Citation2006) and Hussain et al. (Citation2008). Sarfraz (Citation2002) has studied the positivity preserving but his scheme has no free parameter to refine the final curve. Sarfraz, Hussain, and Chaudary (Citation2005) discussed shape preservations by using cubic spline interpolation with GC1 (first order of geometric continuity). It can be proved that their scheme does not guarantee to produce interpolating curve that lie above the given constraint line. Since for some data sets, the curve may violate the shape preservation requirement. The rational cubic spline scheme by Sarfraz, Hussain, and Nisar (Citation2010) may produce negative curve on some interval that will destroys the positivity of the data. Wu, Zhang, and Peng (Citation2010) proposed rational quartic spline for positivity preserving interpolation. Their scheme gives visually pleasing results but at a cost, the construction of the rational quartic spline is very complicated and not easy to used. Besides the use of cubic spline and various types of rational spline, recently there are some studies on the application of trigonometric spline (rational or non-rational) for shape preserving interpolation. For instance, Bashir and Ali (Citation2013) constructed trigonometric spline for positive and constraint interpolation. Hussain, Hussain, and Waseem (Citation2014), Ibraheem, Hussain, Hussain, and Bhatti (Citation2012) and Liu, Che, and Zhu (Citation2015) also consider various types of shape preservations by using difference sets of spline in trigonometric form. Liu et al. (Citation2015) is the best scheme compare with Bashir and Ali (Citation2013), Hussain et al. (Citation2014) and Ibraheem et al. (Citation2012). Since the introduction of cubic Ball in CAGD, there exist some applications in shape preserving interpolation. Karim (Citation2013, Citation2015a, Citation2016a, Citation2016b, Citation2015b) discussed various types of rational cubic Ball for shape preserving interpolation. The main objective of this study is to overcome the drawback in the schemes of Fritsch and Carlson (Citation1980)-PCHIP in MATLAB, Butt and Brodlie (Citation1993), Brodlie et al. (Citation2005), Hussain et al. (Citation2008; Hussain, Sarfraz, & Shaikh, Citation2011), Hussain and Ali (Citation2006) and Sarfraz et al. (Citation2005, Citation2010). To meet the objective, we propose new rational cubic spline (cubic/quadratic) with three parameters. We identify few advantages of the proposed schemes compare with other schemes such as:

  1. The proposed scheme is free from first derivative modification for shape preservations. The schemes of Butt and Brodlie (Citation1993) and Fritsch and Carlson (Citation1980) do required some derivative modification.

  2. The proposed scheme is guarantee to produce positive interpolating curve everywhere. Meanwhile in the schemes proposed by Hussain et al. (Citation2008) and Hussain et al. (Citation2011) and Sarfraz et al. (Citation2010), positivity might not be preserved on some sub-intervals such that along the whole interval, the function value is negative i.e. lie below x-axis.

  3. For constrained data interpolation, the proposed scheme produces interpolating curve that lie above a straight line, but the scheme of Sarfraz et al. (Citation2005) give some interpolating curve that lies below a straight line. Comparing with Karim and Kong (Citation2014), the proposed scheme gives more visually pleasing interpolating curve as well as the curve is very closed to the constraint line.

This paper is organized as follows. Section 2 presents the methodology of the proposed study. This includes the construction of another version of rational spline with quadratic denominators where in each sub-interval; it has three parameters, derivative estimation and geometric properties of the rational interpolant. Shape control analysis will be shown with numerical examples. Section 3 describes about the shape preserving interpolation applications. We consider positivity preserving and constrained data modelling. The automated choice of one parameter that will ensure the rational interpolant satisfies shape preservations properties will be derived with two parameters to refine the curve shape. Section 4 presents the numerical and graphical results, including comparison with established schemes. Finally, Section 5 concludes the paper and presents future recommendation studies by using the proposed scheme.

2. Methodology of the study

We begin with the construction of new rational spline Sx (cubic numerator and quadratic denominator) with three parameters αi,βi, and γi, for i=0,1,,n1. This section is divided into few subsection as follows: the construction of new rational cubic spline, derivative estimation and the geometric properties of the proposed rational interpolant.

2.1. Rational spline construction

Given data xi,fi,i=0,1,,n where x0 < x1 <  < xn and the first derivatives di,i=0,1,,n. Let, Δi=fi+1fi/hi and θ=xxi/hi such that when x=xi then θ=0 and similarly when x=xi+1 then θ=1. Thus 0θ1. For xxi,xi+1,i=0,1,,n1, the rational cubic spline with three parameters αi,βi, and γi, for i=0,1,,n1 is defined by

(1) Sx=Six=PiθQiθ,(1)

where

Piθ=1θ3AI+1θ2θBi+1θθ2Ci+θ3Ei
Qiθ=αi1θ2+αi+γi1θθ+βiθ2

The common requirement for the parametric continuity is C1 or C2 continuous. Throughout this study, we only consider the construction of rational cubic spline with C1 continuity. This condition can be described as follows (Fritsch & Carlson, Citation1980; Sarfraz, Citation2002):

(2) Sxi=fi,S1xi=diSxi+1=fi+1,S1xi+1=di+1(2)

By applying Condition (2) to Equation (1), we obtain the unknown Ai,Bi,Ci and Ei for i=0,1,,n1 as follows:

Ai=αifi,Bi=2αi+γifi+αihidi,Ci=αi+βi+γifi+1βihidi+1, Ei=βifi+1

Therefore, the rational cubic spline in (1) can be written as

(3) Sx=1θ3αifi+1θ2θ2αi+γifi+αihidi+1θθ2αi+βi+γifi+1βihidi+1+θ3βifi+1αi1θ2+αi+γi1θθ+βiθ2(3)

2.2. Derivative estimation

There exist various methods that can be used to estimate the first derivative di,i=0,1,,n such as geometric mean method (GMM), harmonic mean method (HMM) and arithmetic mean method (AMM). Since AMM is simple and easy to use as well as suitable for all types of data sets (Hussain & Sarfraz, Citation2008), throughout this study we utilized AMM. Its formulation is given below:

For i=1,2,3,,n1, di is calculated as follows (Sarfraz, Citation2002):

(4) di=hi1Δi+hiΔi1hi1+hi,(4)

Meanwhile, at i=0 and i=n, the derivative value of d0 and dn are given as

(5) d0=Δ0+Δ0Δ1h0h0+h1(5)
(6) dn=Δn1+Δn1Δn2hn1hn1+hn2(6)

Furthermore, if the data are equally space, then for i=1,2,3,,n1, the first derivatives are given as

di=Δi+Δi12.

2.3. Geometric properties of the rational spline

The geometric properties of the proposed rational cubic spline defined by (3) are investigated in this section. The main focus is on the shape control analysis of the rational spline. This shape control in important in order for us to determine the condition on αi,βi, and γi, for i=0,1,,n1. Furthermore, we will see various types of interpolating curves corresponding with various value of parameters αi,βi, and γi. There are three geometric properties that can be observed:

  • If αi=βi=γi=1, the rational spline interpolant defined by (3) is reduce to cubic Hermite spline polynomial that can be expressed as

(7) Six=fi1θ3+3fi+hidi1θ2θ+3fi+1hidi+11θ2θ+fi+1θ3(7)

which can be simplified to

Six=fi1θ21+2θ+hidi1θ2θhidi+11θ2θ+fi+1θ232θ
  • After some derivation and simplification, the piecewise rational cubic spline Six defined by (3) can be written as

(8) Six=1θfi+θ fi+1+hi1θθαidiΔi1θ+βiΔidi+1θαi1θ2+αi+γi1θθ+βiθ2(8)

From (8), when γi, the rational cubic interpolant Six reduce to a straight line on each sub-interval xi,xi+1,for i=0,1,...,n1. This is also applicable when αi,βi0. Thus the following limit is obtained:

(9) limSixαi,βi0,γi=1θfi+θfi+1(9)
  • When αi < 0, or βi < 0 or γi3, the rational cubic spline interpolant defined by (3) turn to be the standard rational function with vertical asymptotes or poles on sub-interval xi,xi+1, i=0,1,,n1.

A positive data set taken from Wu et al. (Citation2010) is shown in Table . The data sets show the velocity of the wind that has the positive values.

Table 1. A wind data

Figure shows the examples of shape control properties. Figure ) shows the cubic Hermite when αi=βi=γi=1. Figure ) shows the effect when we increases the value of one parameter i.e. γi while αi=βi=1: γi=1 (solid),  γi=10 (dashed) and (grey). Clearly as γi, the rational cubic spline approaching a straight line on each sub-interval. Figure ) also shows the effect that the rational cubic spline reduces to a straight line when both αi,βi0. Figure ) shows the effect when αi=βi=1: γi=1 (solid), αi=0,βi=γi=1(dashed) and βi=0,αi=γi=1(gray). Figure ) shows that when both αi,βi, the rational spline does not reduce to a straight line. Figure ) shows that the interpolating curve have poles when αi=1,βi=γi=1. This is also true when βi < 0 or γi3. This is the main reason that, the parameters are chosen such that αi,βi > 0, and γi0 for i=0,1,,n1. Finally Figure ) shows the effect when αi=βi=1 and γi=5. From this graph, the positivity of the data set is preserved and it is visually pleasing.

Figure 1. Various types of interpolating curves based on shape control analysis.

Figure 1. Various types of interpolating curves based on shape control analysis.

3. Shape preservations

In this section, we derive the sufficient condition for the positivity of the proposed rational cubic spline on one parameter. We begin with positivity preserving interpolation and the idea for positivity preserving is extended to constrained data interpolation for data that lie above an arbitrary straight line.

3.1. Positivity preserving

In order to avoid divided by zero later, we assume that, the given data is strictly positive

(10a) fi > 0,i=0,1,2,,n(10a)

The main objective is to find the condition on γi > 0, i=0,1,,n1 that will ensure the rational spline defined by (3) is positive everywhere. Mathematically, this statement can be expressed as

(10b) Six > 0,i=0,1,2,,n1(10b)

We can preserve the positivity by manipulating the value of the parameters αi,βi > 0, and γi0, for i=0,1,2,,n1 (see Figure ), the positivity of the data in Table is preserved when αi=βi=1 and γi=5, etc.). But this approach is not practical and really time consuming to find suitable value for all parameters. Our aim is to find the automated choice on one parameter γi > 0, i=0,1,,n1 that will produce positive rational cubic interpolant that resulting the positive interpolating curve on the whole given domain (by satisfying Condition (10b)). Meanwhile, αi,βi > 0 are free parameters for shape modification. For αi,βi > 0, and γi0 for i=0,1,,n1, the denominator Qiθ is positive i.e. Qiθ > 0. Therefore, the sufficient condition for the positivity of the rational interpolant defined by (3) can be derived by considering only the numerator i.e. the cubic polynomial Piθ,i=0,1,,n1 such that Piθ > 0. Therefore, the rational cubic spline Six > 0,if the cubic polynomial Piθ > 0 for i=0,1,2,,n1. The following results are obtained by Schmidt and Hess (Citation1988). The cubic spline Piθ,i=0,1,,n1 is positive if

(11) Pi0,Pi1R1R2(11)

where

(12) R1=a,b:a > 3Pi0hi,b < 3Pi1hi(12)
(13) R2=a,b:36fifi+1a2+b2+ab3Δia+b+3Δi2 +3fi+1afib2hiab3fi+1a+3fib+ 4hifi+1a3fib3hi2a2b2 > 0.(13)

Note: Here a=Pi0 and b=Pi1, respectively.

The sufficient condition for the positivity of Six,i=0,1,2,,n1 can be derived either by using (12) or (13). But since Condition (12) is simple to be used compared to (13) and this condition also will guarantee to produce the positive cubic polynomial everywhere. Therefore, in this study we will use Condition (12). This condition has been used by many other authors (Hussain & Ali, Citation2006; Hussain & Hussain, Citation2006; Hussain et al., Citation2014; Hussain & Sarfraz, Citation2008; Hussain et al., Citation2011; Ibraheem et al., Citation2012; Karim, Citation2013, Citation2015a, Citation2016a, Citation2016b, Citation2015b; Karim & Kong, Citation2014; Liu et al., Citation2015; Sarfraz, Citation2002; Sarfraz et al., Citation2005, Citation2010).

The following theorem gives the sufficient conditions for the positivity of rational spline.

Theorem 1. Given strictly positive data in (10a), rational cubic interpolant Sx defined by (3) is positive everywhere if in each sub-interval xi,xi+1, i=0,1,,n1, the parameter γi > 0, i=0,1,,n1 satisfies the following condition:

αi,βi > 0,
(14) γi > Max0,αihidifi+2, βihidi+1fi+11αi(14)

Proof.

Firstly, we derive the first derivative of Piθ which can be written as

Piθ=3αifi1θ2+Bi1θ22θ1θ+Ciθ2+2θ1θ+3βifi+1θ2hi

where

Bi=2αi+γifi+αihidi,Ci=αi+βi+γifi+1βihidi+1

The sufficient condition of the positivity is derived by using (12):

(15) Pi0 > 3Pi0hi3αifi+2αi+γifi+αihidiihi > 3αifihi(15)

and

(16) Pi1 < 3Pi1hi3βifi+1αi+βi+γifi+1+βihidi+1ihi < 3βifi+1hi(16)

Both conditions can be further simplified to

(17) γi > αihidifi+2(17)

and

(18) γi > βihidi+1fi+11αi(18)

By using (17) and (18), Six > 0,i=0,1,2,,n1 if parameter γi > 0, i=0,1,,n1 satisfy the following positivity condition:

γi > Max0,αihidifi+2, βihidi+1fi+11αi,i=0,1,,n1

This condition can be written as

(19) γi=εi+Max0,αihidifi+2, βihidi+1fi+11αi,i=0,1,,n1(19)

such that 0 < εi0.5.

The following is an algorithm for computer implementation.

Algorithm 1: positivity preserving interpolation

Input: Data points, first derivative and the parameters αi,βi > 0 and εi > 0.

Output: positive interpolating curve

Step 1: Input data points xi,fi,i=0,1,2,,n

Step 2: For i=1,,n

  • Calculate the first derivative values by using AMM.

Step 3: For i=1,,n1

  • Input parameters αi,βi > 0 and εi > 0.

  • Calculate the parameter values, γi > 0 by using the sufficient condition (19).

  • Repeat by choosing different value of αi,βi > 0 and εi > 0.

Step 4: For i=1,,n1

  • Construct positive curve with C1 continuity using rational cubic spline defined by (3).

3.2. Constrained data interpolation

The constrained data interpolation for data that lie on a same side as the constraint line is constructed by extending the positivity scheme discussed in the previous section. In this study, we only consider the data that lie above straight line. The problem statement can be read as follows:

Given positive data set xi,fi,i=0,1,,n lie above a straight line y=mx+c such that

(20) fi > mxi+c,i=0,1,,n.(20)

The rational spline interpolation Six defined in (3) lie above a straight line 1θai+θbi, i=0,1,,n1 if

(21) Six > ai1θ+biθ(21)

Here, we adopted the notation ai=mxi+c,  i=0,1,,n and bi=mxi+1+c,  i=0,1,,n1.

(21) Onxi,xi+1, i=0,1,,n1, from(21)
(22) Six=PiθQiθ > ai1θ+biθ(22)

which can be written

Six=UiθQiθ > 0

with

(23) Uiθ=Piθai1θ+biθQiθ(23)

Simple simplification to (23) leads to

Uiθ=1θ3αifiai+1θ2θK1+1θθ2Ki2+θ3βifi+1bi

with

K1=αi+γifiai+αifi+αihidiαibi
K2=αi+γifi+1bi+βifi+1βihidi+1aiβi

Theorem 2.

The rational spline interpolant on Six in (3) lie above a straight line on xi,xi+1, i=0,1,,n1, if the parameters γi satisfies the following condition:

γi > Max0,αihidi+bififiai,βihidi+1+aifi+1fi+1biαi.

with αi,βi > 0.

Proof.

Since αi,βi > 0, the curve lie above a straight line if Uiθ > 0. The necessary conditions arefiai > 0 and fi+1bi > 0, respectively. Thus the sufficient condition can be derived from inequalities K1 > 0 and K2 > 0, such that:

(24) K1 > 0αi+γifiai+αifi+αihidiαibi > 0(24)

and

(25) K1 > 0αi+γifi+1bi+βifi+1βihidi+1aiβi > 0(25)

From (24) and (25) we obtain

(26) γi > αihidi+bififiai(26)

and

(27) γi > βihidi+1+aifi+1fi+1biαi(27)

For  i=0,1,,n1, both conditions (26) and (27) can be combined to produce the automatic choice of the parameter γi > 0,

(28) γi > Max0,αihidi+bififiai,βihidi+1+aifi+1fi+1biαi(28)

This completes the proof.

Remark 2: To generate the curve lie above straight line, Condition (28) can be rewritten as

(29) γi=ηi+Max0,αihidi+bififiai,βihidi+1+aifi+1fi+1biαi(29)

where 0 < ηi0.5.

Below is algorithm that can be used to generate the interpolating curve that lies above arbitrary straight line where parameter γi,is calculated from (29) with suitable positive values of αi,βi and ηi.

Algorithm 2: constrained data interpolation

Input: Data points, first derivative and parameters αi,βi > 0 and εi > 0 and the constraint line y=mx+c.

Output: constrained interpolating curve

Step 1: Input data points xi,fi,i=0,1,2,,n

Step 2: For i=1,,n

  • Calculate the first derivative values by using AMM.

Step 3: For i=1,,n1

  • Input parameters αi,βi > 0 and ηi > 0.

  • Calculate the parameter values, γi > 0 by using the sufficient condition (29).

  • Repeat by choosing the different value of αi,βi > 0 and ηi > 0.

Step 4: For i=1,,n1

  • Construct the interpolating curve that lie above a straight line with C1 continuity by using (3).

4. Results and discussion

The numerical results for positivity preserving interpolation and the constrained data interpolation above arbitrary straight line will be presented. For positivity preserving, three data sets were chosen from Butt and Brodlie (Citation1993), Sarfraz et al. (Citation2010) and Hussain and Ali (Citation2006), respectively. Meanwhile for constrained data interpolation, three data sets also were used. All numerical experiments are done by using Mathematica Version 11 and MATLAB Version 2015 on Intel(R) Core (TM) i5-3470 CPU @3.20GHz.

Example 1. The data given in Table demonstrate the oxygen level from experiment conducted in the laboratory. It was quoted from Butt and Brodlie (Citation1993). Figure ) shows the cubic spline interpolation as discussed in Section 2. Figure ) and ) shows the positivity preserving interpolations by using the schemes of Hussain and Ali (Citation2006) and Fritsch and Carlson (Citation1980) (PCHIP in MATLAB). Figure ) shows the positivity preserving interpolation by using the proposed scheme with αi=βi=1 for all i=0,1,,5 and the parameters γi=0.1,0.1,0.7845,13.05,0.1,0.1. Figure ) shows the positivity preserving interpolation by using the proposed scheme with αi=1,βi=2 for all i=0,1,,5 with γi=0.1,0.1,0.7845,13.05,0.1,0.1. The γi is assigned subject to the Condition (19). The interpolating curve in Figure ) is visually pleasing compare with the work of Hussain and Hussain (Citation2006). Finally, Figure ) and ) shows that the interpolating curve produced by the schemes of Hussain et al. (Citation2011) and Hussain et al. (Citation2008). Clearly, both schemes fail to preserve the positivity of the data on the interval (Hussain et al., Citation2011, 28).

Table 2. A positive data from Butt and Brodlie (Citation1993)

Figure 2. The interpolating curves produced by the proposed scheme and other existing schemes.

Figure 2. The interpolating curves produced by the proposed scheme and other existing schemes.

Example 2. Table shows the data used in Sarfraz et al. (Citation2010) which demonstrates the volumeof NaOH taken in a beaker vs HCl as stated in the experiment procedures. Figure ) shows the cubic Hermite spline interpolation. Figure ) shows the positivity preserving interpolation by using the scheme of Hussain and Ali (Citation2006). Figure ) show the positivity preserving interpolation by using the schemes of Hussain and Sarfraz (Citation2008) and PCHIP, respectively. Figure ) shows the positivity preserving interpolation by using the proposed scheme when αi=βi=1 for i=0,1,,5 and the parameter γi=0.1,10.8,0.1,0.1,6,0.1 is calculated from Condition (19). Figure ) shows the positive interpolating curve when αi=2, βi=1 for i=0,1,,5 and γi=0.1,21.5,0.1,0.1,11.9,0.1. Finally, Figure ) shows the interpolating curve when αi=1, βi=2 for i=0,1,,5 and γi=0.1,10.8,0.1,0.1,12.667,0.1. From Figure ), the smaller the value of αi (or increasing βi value) give loose curve while the bigger value of αi (or reducing βi value) produce tight curve as shown in Figure ).

Table 3. A positive data from Sarfraz et al. (2010)

Figure 3. The interpolating curves produced by the proposed scheme and other existing schemes.

Figure 3. The interpolating curves produced by the proposed scheme and other existing schemes.

Example 3. Table is obtained from Hussain and Ali (Citation2006) which demonstrate the depreciation of the valuation of the market price of computers which are installed at City Computer Center. The x-coordinate corresponds to the time in years and y-coordinate corresponds to the computers price in 10000. Figure ) shows the cubic Hermite spline interpolation. Figure ) shows the positivity preservation by the scheme of Hussain and Ali (Citation2006). Figure ) shows the positivity preserving interpolation by using PCHIP scheme. Figure ) shows the positivity interpolation by using the proposed scheme when αi=βi=1 for i=0,1,,7 with γi=0.1,0.1,5.167,0.1,0.1,0.1,0.1. Meanwhile Figure ) shows the positive interpolating curve for αi=2,βi=1 for i=0,1,,6 and γi=0.1,0.1,10.23,0.1,0.1,0.1,0.1. The parameter γi is calculated from Condition (19). The proposed scheme gives more visually pleasing curves than the interpolating curve produced by the scheme of Hussain and Ali (Citation2006) and PCHIP. The two shape parameters αi,βi are used to refine the positive curve.

Table 4. A positive data from Hussain and Ali (Citation2006)

Figure 4. The interpolating curves produced by the proposed scheme and other existing schemes.

Figure 4. The interpolating curves produced by the proposed scheme and other existing schemes.

Example 4. Table demonstrates the data lies above a straight liney=x+2 from Hussain and Hussain (Citation2006). Figure ) shows the cubic Hermite spline interpolation. Clearly cubic Hermite is unable to produce interpolating curve lie above straight line. Figure ) shows the constrained data interpolation by using the method of Hussain and Hussain (Citation2006). Figure ) shows that the scheme of Sarfraz et al. (Citation2005) fails to produce the interpolating curve with shape preservation. Figure ) shows the interpolating curve by using Karim and Kong (Citation2014) scheme. Figure ) –) shows the constrained data interpolation using the proposed scheme with αi=βi=1, αi=1,βi=2 and αi=1,βi=4 for all i=0,1,,6. The parameter γi is calculated from Condition (29) and are given as γi=0.1,0.1,1.785,14.05,0.1,0.1 for Figure ), γi=0.1,0.1,1.785,4.05,0.1,0.1 for Figure ) and γi=0.1,0.1,1.785,20.378,0.1,0.1 for Figure ), respectively. Figure ) indicates that the bigger the value of βi will give loose curve and very visually pleasing. Compared to Karim and Kong (Citation2014), the proposed scheme gives more visually pleasing results as well as the interpolating curve is very close to the constraint line while at the same time maintaining shape preservation. Therefore, by having two free parameters, αi,βi, the interpolating curves can be changed interactively.

Table 5. A data set from Hussain and Hussain (Citation2006)

Figure 5. Interpolating curves generated by the proposed scheme and other existing schemes.

Figure 5. Interpolating curves generated by the proposed scheme and other existing schemes.

Example 5. Data in Table lie above y=0.5x+0.75 .

Table 6. A data above straight line

Figure ) shows that the cubic spline interpolation cannot produce the interpolating curve lie above a straight line. Figure ) until 6(d) shows the constrained data interpolation with the proposed scheme by using Theorem 2. The proposed scheme with αi=βi=0.5 give more visually pleasing result compare with the other interpolating curves.

Figure 6. Interpolating curves for data in Table .

Figure 6. Interpolating curves for data in Table 6.

Example 6. The data in Table lie above two straight lines y=x.

Table 7. A data above straight line

Figure ) shows that the cubic spline interpolation with αi=βi=γi=1 is not shape preserving interpolation to the constraint line. Figure ) until ) shows that the interpolating curve lies above the given constraint line by applying Theorem 2.

Figure 7. Various interpolating curves.

Figure 7. Various interpolating curves.

From all numerical and graphical results, we can conclude that, the proposed scheme is on par with some existing schemes. Furthermore, for some data sets, we show that various existing schemes are not shape preserving. For instance, for positive data in Table , the schemes proposed by Hussain et al. (Citation2011) and Hussain et al. (Citation2008) fail to preserve the positivity on the sub-interval (Hussain et al., Citation2011, 28). Sarfraz et al.’s (Citation2005) scheme also fails to produce the interpolating curve lie above a constraint line. Furthermore, for data set in Table , the proposed scheme gives more visually pleasing result compared with the scheme of Karim and Kong (Citation2014) and PCHIP. With all this examples and justification, the proposed scheme is suitable for positivity preserving and constrained data interpolation since the two free parameters αi,βi, can be utilized to produce visually pleasing results while at the same time achieve the shape preservations.

5. Conclusion and future recommendation

To overcome the drawback in some shape preserving schemes, in this study a new type of rational cubic spline (cubic numerator and quadratic denominator) is constructed. It has three parameters αi,βi, and γi, for all i=0,1,,n1. This new rational spline (cubic/quadratic) is used for positivity preserving and constrained interpolation for data lie above arbitrary straight line. To achieve the shape preserving, we derive an automatic choice on one parameter γi, for i=0,1,,n1 meanwhile the other two parameters αi and βi can be used to modify the shape of the interpolating curve. Theorems 1 and 2 are guaranteed sufficient to produce the positive interpolating curve and constrained interpolating curve lie above arbitrary straight line. Work on monotonicity and convexity shape preserving interpolation by using the proposed scheme is underway including surface interpolation

Acknowledgement

This research is fully supported by Universiti Teknologi PETRONAS (UTP) through a research grant YUTP: 0153AA-H24 (Spline Triangulation for Spatial Interpolation of Geophysical Data).

Data Availability Statement

All data used in this study are obtained from other sources that have been cited in this paper.

Additional information

Funding

This work was supported by Universiti Teknologi PETRONAS (UTP), Spline Triangulation for Spatial Interpolation of Geophysical Data [grant number YUTP 0153AA-H24].

Notes on contributors

Samsul Ariffin Abdul Karim

Samsul Ariffin Abdul Karim is a senior lecturer at Fundamental and Applied Sciences Department, Universiti Teknologi PETRONAS (UTP). He has been in the department for more than 10 years. He obtained his BAppSc., MSc and PhD in Computational Mathematics & Computer Aided Geometric Design (CAGD) from Universiti Sains Malaysia (USM). He had 15 years of experience using Mathematica and MATLAB software for teaching and research activities. His research interests include curves and surfaces designing, geometric modelling and wavelets applications in image compression and statistics. He has published more than 110 papers in Journal and Conferences as well as seven books including two research monographs as well as one edited conference volumeand 10 book chapters. He was the recipient of Effective Education Delivery Award and Publication Award (Journal & Conference Paper), UTP Quality Day 2010, 2011 and 2012, respectively. He is Certified WOLFRAM Technology Associate, Mathematica Student Level.

References

  • Abbas, M. , Majid, A. A. , M.N.Hj, A. , & Ali, J. M. (2012). Constrained shape preserving rational bi-cubic spline interpolation. World Applied Sciences Journal , 20(6), 790–800.
  • Bashir, U. , & Ali, J. M. (2013). Data visualization using rational trigonometric spline. Journal of Applied Mathematics , 2013(Article ID 531497), 10. doi:10.1155/2013/531497
  • Brodlie, K. W. , Asim, M. R. , & Unsworth, K. (2005). Constrained visualization using Shepard interpolation family. Computers and Graphics Forum , 24(4), 809–820. doi:10.1111/j.1467-8659.2005.00903.x
  • Butt, S. , & Brodlie, K. W. (1993). Preserving positivity using piecewise cubic interpolation. Computer and Graphics , 17(1), 55–64. doi:10.1016/0097-8493(93)90051-A
  • Fritsch, F. N. , & Carlson, R. E. (1980). Monotone piecewise cubic interpolation. SIAM Journal Numerical Analysis , 17, 238–246. doi:10.1137/0717021
  • Hussain, M. Z. , & Ali, J. M. (2006). Positivity preserving piecewise rational cubic interpolation. Matematika , 22(2), 147–153.
  • Hussain, M. Z. , & Hussain, M. (2006). Visualization of data subject to positive constraint. Journal of Information and Computing Sciences , 1(3), 149–160.
  • Hussain, M. Z. , Hussain, M. , & Samreen, S. (2008). Visualization of shaped data by rational quartic spline interpolation. International Journal of Applied Mathematics & Statistics , 13(J08), 34–46.
  • Hussain, M. Z. , Hussain, M. , & Waseem, A. (2014). Shape-preserving trigonometric functions. Computational and Applied Mathematics , 33, 411–431. doi:10.1007/s40314-013-0071-1
  • Hussain, M. Z. , & Sarfraz, M. (2008). Positivity-Preserving interpolation of positive data by rational cubics. Journal of Computational and Applied Mathematics , 218, 446–458. doi:10.1016/j.cam.2007.05.023
  • Hussain, M. Z. , Sarfraz, M. , & Shaikh, T. S. (2011). Shape preserving rational cubic spline for positive and convex data. Egyptian Informatics Journal , 12, 231–236. doi:10.1016/j.eij.2011.10.002
  • Ibraheem, F. , Hussain, M. , Hussain, M. Z. , & Bhatti, A. A. (2012). Positive data visualization using trigonometric polynomials. Journal of Applied Mathematics , Article ID, 247120.
  • Karim, S. A. A. (2013). Rational cubic ball functions for positivity preserving. Far East Journal of Mathematical Sciences (FJMS) , 82(2), 193–207.
  • Karim, S. A. A. (2015a). Positivity preserving by using rational cubic ball function. AIP Conference Proceedings , 1660, 050049.
  • Karim, S. A. A. (2015b). Shape preserving by using rational cubic ball interpolant. Far East Journal of Mathematical Sciences (FJMS) , 96(2), 211–230. doi:10.17654/FJMSJan2015_211_230
  • Karim, S. A. A. (2016a). Data Interpolation using rational cubic Ball spline with three parameters. AIP Conference Proceedings , 1787, 080023.
  • Karim, S. A. A. (2016b). Positivity preserving interpolation by using rational cubic ball spline. Jurnal Teknologi , 78(11), 141–148.
  • Karim, S. A. A. , & Kong, V. P. (2014). (2014). Shape preserving interpolation using rational cubic spline. Research Journal of Applied Sciences, Engineering and Technology (RJASET) , 8(2), 167–168. doi:10.19026/rjaset.8.956
  • Liu, S. , Che, Z. , & Zhu, Y. (2015). Rational quadratic trigonometric interpolation spline for data visualization. Mathematical Problems in Engineering , 2015(Article ID 983120), 20.
  • Sarfraz, M. (2002). Visualization of Positive and Convex Data by a Rational Cubic Spline Interpolation , Information Sciences , 146(1–4), 239–254.
  • Sarfraz, M. , Hussain, M. Z. , & Chaudary, F. S. (2005). Shape preserving cubic spline for data visualization. Computer Graphics and CAD/CAM , 01, 185–193.
  • Sarfraz, M. , Hussain, M. Z. , & Nisar., A. (2010). Positive data modeling using spline function. Applied Mathematics and Computation , 216, 2036–2049. doi:10.1016/j.amc.2010.03.034
  • Schmidt, J. W. , & Hess, W. (1988). Positivity of cubic polynomials on intervals and positive spline interpolation. BIT , 28, 340–352. doi:10.1007/BF01934097
  • Wu, J. , Zhang, X. , & Peng, L. (2010). Positive approximation and interpolation using compactly supported radial basis functions. Mathematical Problems in Engineering , Article ID 964528, 10.