# Local Convexity Shape-Preserving Data Visualization by Spline Function

Authors: Muhammad Abbas; Ahmad Abd Majid; Mohd Nain Hj Awang; Jamaludin Md Ali
Journal: ISRN Mathematical Analysis
 (2012)

---

## Abstract

The main purpose of this paper is the visualization of convex data that results in a smooth, pleasant, and interactive convexity-preserving curve. The rational cubic function with three free parameters is constructed to preserve the shape of convex data. The free parameters are arranged in a way that two of them are left free for user choice to refine the convex curve as desired, and the remaining one free parameter is constrained to preserve the convexity everywhere. Simple data-dependent constraints are derived on one free parameter, which guarantee to preserve the convexity of curve. Moreover, the scheme under discussion is,C1 flexible, simple, local, and economical as compared to existing schemes. The error bound for the rational cubic function is O(h3).


---

## Body

## 1. Introduction

Spline interpolation is a significant tool in computer graphics, computer-aided geometric design and engineering as well. Convexity is prevalent shape feature of data. Therefore, the need for convexity preserving interpolating curves and surfaces according to the given data becomes inevitable. The aspiration of this paper is to preserve the hereditary attribute that is the convexity of data. There are many applications of convexity preserving of data, for instance, in the design of telecommunication systems, nonlinear programming arising in engineering, approximation of functions, optimal control, and parameter estimation.The problem of convexity-preserving interpolation has been considered by a number of authors [1–21] and references therein. Bao et al. [1] used function values and first derivatives of function to introduce a rational cubic spline (cubic/cubic). A method for value control, inflection-point control and convexity control of the interpolation at a point was developed to be used in practical curve design. Asaturyan et al. [3] constructed a six-degree piecewise polynomial interpolant for the space curves to satisfy the shape-preserving properties for collinear and coplanar data.Brodlie and Butt [4] developed a piecewise rational cubic function to preserve the shape of convex data. In [4], the authors inserted extra knots in the interval where the interpolation loses the convexity of convex data which is the drawback of this scheme. Carnicer et al. [5] analyzed the convexity-preserving properties of rational Bézier and non-uniform rational B-spline curves from a geometric point of view and also characterize totally positive systems of functions in terms of geometric convexity-preserving properties of the rational curves.Clements [6] developed a C2 parametric rational cubic interpolant with tension parameter to preserve the convexity. Sufficient conditions were derived to preserve the convexity of the function on strictly left/right winding polygonal line segments. Costantini and Fontanella [8] preserved the convexity of data by semi-global method. The scheme has some research gaps like the degree of rectangular patches in the interpolant that was too large; the resulting surfaces were not visually pleasing and smooth.Delbourgo and Gregory [9] developed an explicit representation of rational cubic function with one free parameter which can be used to preserve the convexity of convex data. Meng and Shi Long [11] also developed an explicit representation of rational cubic function with two free parameters which can be used to preserve the convexity of convex data. In the schemes [9, 11], there was no choice for user to refine the convexity curve as desired. The rational spline was represented in terms of first derivative values at the knots and provided an alternative to the spline under tension to preserve the shape of monotone and convex data by Gregory [10].McAllister [12], Passow [13], and Roulier [14] considered the problem of interpolating monotonic and convex data in the sense of monotonicity and convexity preserving. They used a piecewise polynomial Bernstein-Bézier function and introduce additional knots into their schemes. Such a scheme for quadratic spline interpolation was described by McAllister [12] and was further developed by Schumaker [15] using piecewise quadratic polynomial which was very economical, but the method generally inserts an extra knot in each interval to interpolate.Sarfraz and Hussain [17] used the rational cubic function with two shape parameters to solve the problem of convexity preserving of convex data. Data-dependent sufficient constraints were derived to preserve the shape of convex data. Sarfraz [18] developed a piecewise rational cubic function with two families of parameters. In [18], the authors derived the sufficient conditions on shape parameters to preserve the physical shape properties of data. Sarfraz [19–21] used piecewise rational cubic interpolant in parametric context for shape preserving of plane curves and scalar curves with planar data. The schemes [17–21] are local, but, unfortunately, they have no flexibility in the convexity-preserving curves.In this paper, we construct a rational cubic function with three free parameters. One of the free parameter is used as a constrained to preserve the convexity of convex data while the other two are left free for the user to modify the convex curve. Sufficient data-dependent constraints are derived. Our scheme has a number of attributes over the existing schemes.(i)
In this paper, the shape-preserving of convex data is achieved by simply imposing the conditions subject to data on the shape parameters used in the description of rational cubic function. The proposed scheme works evenly good for both equally and unequally spaced data. In contrast [1] assumed certain function values and derivative values to control the shape of the data.(ii)
In [12, 15], the smoothness of interpolant is C0while in this work the degree of smoothness isC1.(iii)
The developed scheme has been demonstrated through different numerical examples and observed that the scheme is not only local, computationally economical, and easy to compute, time saving but also visually pleasant as compared to existing schemes [17–21].(iv)
In [9–11, 17–21], the schemes do not allow to user to refine the convex curve as desired while for more pleasing curve (and still having the convex shape preserved) an additional modification is required, and this task is more easily done in this paper by simply adjustment of free parameters in the rational cubic function interpolation on user choice.(v)
In [17–21], the authors did not provide the error analysis of the interpolants while a very goodO(h3)error bound is achieved in this paper.(vi)
In [4, 12–15], the authors developed the schemes to achieve the desired shape of data by inserting extra knots between any two knots in the interval while we preserve the shape of convex data by only imposing constraints on free parameters without any extra knots.The remaining part of this paper is organized as follows. A rational cubic function is defined in Section2. The error of the rational cubic interpolant is discussed in Section 3. The problem of shape preserving convexity curve is discussed in Section 4. Derivatives approximation method is given in Section 5. Some numerical results are given in Section 6. Finally, the conclusion of this work is discussed in Section 7.


## 2. Rational Cubic Spline Function

Let{(xi,fi),i=0,1,2,…,n}be the given set of data points such asx0<x1<x2<⋯<xn. The rational cubic function with three free parameters introduced by Abbas et al. [2], in each subintervalIi=[xi,xi+1],i=0,1,2,…,n-1,is defined as
(2.1)Si(x)=pi(θ)qi(θ),
with
(2.2)pi(θ)=uifi(1-θ)3+(wifi+uihidi)θ(1-θ)2+(wifi+1-vihidi+1)θ2(1-θ)+vifi+1θ3,qi(θ)=ui(1-θ)3+wiθ(1-θ)+viθ3,
whereθ=x-xi/hi,hi=xi+1-xi, andui,vi,wiare the positive free parameters. It is worth noting that when we use the values of these free parameters asui=1,vi=1andwi=3,then theC1 piecewise rational cubic function (2.1) reduces to standard cubic Hermite spline discussed in Schultz [16].The piecewise rational cubic function has the following interpolatory conditions:(2.3)Si(xi)=fi,Si(xi+1)=fi+1,Si′(xi)=di,Si′(xi+1)=di+1,
whereSi′(x)denotes the derivative with respect to “x,” anddi denotes the derivative values at knots.


## 3. Interpolation Error Analysis

The error analysis of piecewise rational cubic function (2.1) is estimated, without loss of generality, in the subintervalIi=[xi,xi+1]. It is to mention that the scheme constructed in Section 2 is local. We suppose thatf(x)∈C3[x0,xn], andSi(x)is the interpolation of functionf(x)over arbitrary subintervalIi=[xi,xi+1]. The Peano Kernel Theorem, Schultz [16] is used to obtain the error analysis of piecewise rational cubic interpolation in each subintervalIi=[xi,xi+1], and it is defined as
(3.1)R[f]=f(x)-Si(x)=12∫xixi+1f(3)(τ)Rx[(x-τ)+2]dτ.
In each subinterval, the absolute value of error is
(3.2)|f(x)-Si(x)|≤12‖f(3)(τ)‖∫xixi+1|Rx[(x-τ)+2]|dτ,
where(3.3)Rx[(x-τ)+2]={(x-τ)2-(wi(xi+1-τ)2-2hivi(xi+1-τ))θ2(1-θ)+vi(xi+1-τ)2θ3qi(θ)xi<τ<x,(wi(xi+1-τ)2-2hivi(xi+1-τ))θ2(1-θ)+vi(xi+1-τ)2θ3qi(θ)x<τ<xi+1,={a(τ,x)xi<τ<x,b(τ,x)x<τ<xi+1,
whereRx[(x-τ)+2] is called the Peano Kernel of integral. To derive the error analysis, first of all we need to examine the properties of the kernel functionsa(τ,x) andb(τ,x), and then to find the values of following integrals:
(3.4)∫xixi+1|Rx[(x-τ)+2]|dτ=∫xix|a(τ,x)|dτ+∫xxi+1|b(τ,x)|dτ.
So, we calculate these values in two parts. The proof of Theorem will be completed by combining these two parts.


### 3.1. Part 1

By simple computation, the roots ofa(x,x)=(θ2(1-θ)2((wi-νi)θ+(2νi-wi))hi2)/qi(θ)in[0,1] are θ=0,θ=1andθ*=1-νi/(wi-νi). It is easy to show that whenθ≤θ*, a(x,x)≤0 andθ≥θ*,a(x,x)≥0. The roots of quadratic functiona(τ,x)=0 are
(3.5)τ1*=x-θhi(θ(wi-νi)+A)(1-θ)ui+θwi,τ1**=x-θhi(θ(wi-νi)-A)(1-θ)ui+θwi,
where A=νi((wi-2νi)+3θ)+wi(wi-4νi)θ.So, whenθ>θ*,xi<τ1**<x and whenθ<θ*,τ1**>x. Thus,θ<θ*,a(τ,x)<0forallτ∈[xi,x],
(3.6)∫xix|a(τ,x)|dτ=∫xix(-a(τ,x))dτ=(νi(3-θ)-wi(1-θ))(1-θ)3θ2hi33qi(θ)+(wi-3vi)(1-θ)θ2hi33qi(θ)+viθ3hi33qi(θ)-θ3hi33.
The value ofa(τ,x) varies from negative to positive on the rootτ1**whenθ>θ*,
(3.7)∫xix|a(τ,x)|dτ=∫xiτ1**(-a(τ,x))dτ+∫τ1**xa(τ,x)dτ=2((wi-νi)θ-A)3θ3hi33((1-θ)ui+θwi)3-θ3hi33-2hi33qi(θ)[(1-θ)+θ((wi-νi)θ-A)(1-θ)ui+θwi]3×((1-θ)wi+θνi)+2hi3νiθ2(1-θ)qi(θ)[(1-θ)+θ((wi-νi)θ-A)(1-θ)ui+θwi]2.


### 3.2. Part 2

In this part, we discuss the properties of functionb(τ,x). Considerb(τ,x),τ∈[x,xi+1] as function ofτ. The roots of functionb(τ,x) are similar asa(τ,x)in Section 3.1 atτ=x. It is easy to show that whenθ≤θ*,b(x,x)≤0andθ≥θ*, b(x,x)≥0. The roots of quadratic functionb(τ,x)=0are
(3.8)τ2*=xi+1,τ2**=xi+1-2(1-θ)νihi(1-θ)wi+θνi.
The functionb(τ,x)varies from negative to positive on the rootτ2**when θ≤θ*. Thus,
(3.9)∫xxi+1|b(τ,x)|dτ=∫xτ2**(-b(τ,x))dτ+∫τ2**xi+1b(τ,x)dτ=8θ2(1-θ)3νi3hi33qi(θ)((1-θ)ui+θwi)2+hi3θ2(1-θ)33qi(θ)(wi(1-θ)-νi(3-θ)),
whenθ≥θ*,(3.10)∫xxi+1|b(τ,x)|dτ=∫xxi+1b(τ,x)dτ=hi3θ2(1-θ)33qi(θ)(νi(3-θ)-wi(1-θ)).
Thus, from (3.6) and (3.9), it can be shown that when 0≤θ≤θ*,(3.11)|f(x)-Si(x)|≤12‖f(3)(τ)‖∫xixi+1|Rx[(x-τ(x-τ)+2]|dτ=‖f(3)(τ)‖hi3p1(ui,vi,wi,θ),
where(3.12)p1(ui,νi,wi,θ)=(νi(3-θ)-wi(1-θ))(1-θ)3θ26qi(θ)+(wi-3νi)(1-θ)θ26qi(θ)+νiθ36qi(θ)-θ36+8θ2(1-θ)3νi36qi(θ)((1-θ)ui+θwi)2+θ2(1-θ)36qi(θ)(wi(1-θ)-νi(3-θ)),
and, from (3.7) and (3.10), it can be shown that when θ*≤θ≤1,(3.13)|f(x)-Si(x)|≤12‖f(3)(τ)‖∫xixi+1|Rx[(x-τ)+2]|dτ=‖f(3)(τ)‖hi3p2(ui,νi,wi,θ),
where(3.14)p2(ui,νi,wi,θ)=2((wi-νi)θ-A)3θ36((1-θ)ui+θwi)3-θ36-26qi(θ)[(1-θ)+θ((wi-νi)θ-A)(1-θ)ui+θwi]3×((1-θ)wi+θνi)+νiθ2(1-θ)qi(θ)[(1-θ)+θ((wi-νi)θ-A)(1-θ)ui+θwi]2+θ2(1-θ)36qi(θ)(νi(3-θ)-wi(1-θ)).Theorem 3.1.
For the positive free parametersui,νi,andwi, the error of interpolating rational cubic functionSi(x), for f(x)∈C3[x0,xn], in each subinterval Ii=[xi,xi+1] is
(3.15)|f(x)-Si(x)|≤12‖f(3)(τ)‖∫xixi+1|Rx[(x-τ)+2]|dτ=‖f(3)(τ)‖hi3ci,ci=max⁡0≤θ≤1p(ui,νi,wi,θ),
where
(3.16)p(ui,νi,wi,θ)={max⁡p1(ui,νi,wi,θ),0≤θ≤θ*max⁡p2(ui,νi,wi,θ),θ*≤θ≤1.Remark 3.2.
It is interesting to note that the rational cubic interpolation (2.1) reduces to standard cubic Hermite interpolation when we adjust the values of parameters asui=1,νi=1andwi=3. In this special case, the functionsp1(ui,νi,wi,θ)andp2(ui,νi,wi,θ) are
(3.17)p1(ui,vi,wi,θ)=4θ2(1-θ)33(3-2θ)2,0≤θ≤12,(3.18)p2(ui,νi,wi,θ)=4θ3(1-θ)23(1+2θ)2,12≤θ≤0,
respectively. Sinceci=max{max0≤θ≤0.5p1(ui,νi,wi,θ),max0.5≤θ≤0p2(ui,νi,wi,θ)}=1/96. This is the standard result for standard cubic Hemite spline interpolation.


## 3.1. Part 1

By simple computation, the roots ofa(x,x)=(θ2(1-θ)2((wi-νi)θ+(2νi-wi))hi2)/qi(θ)in[0,1] are θ=0,θ=1andθ*=1-νi/(wi-νi). It is easy to show that whenθ≤θ*, a(x,x)≤0 andθ≥θ*,a(x,x)≥0. The roots of quadratic functiona(τ,x)=0 are
(3.5)τ1*=x-θhi(θ(wi-νi)+A)(1-θ)ui+θwi,τ1**=x-θhi(θ(wi-νi)-A)(1-θ)ui+θwi,
where A=νi((wi-2νi)+3θ)+wi(wi-4νi)θ.So, whenθ>θ*,xi<τ1**<x and whenθ<θ*,τ1**>x. Thus,θ<θ*,a(τ,x)<0forallτ∈[xi,x],
(3.6)∫xix|a(τ,x)|dτ=∫xix(-a(τ,x))dτ=(νi(3-θ)-wi(1-θ))(1-θ)3θ2hi33qi(θ)+(wi-3vi)(1-θ)θ2hi33qi(θ)+viθ3hi33qi(θ)-θ3hi33.
The value ofa(τ,x) varies from negative to positive on the rootτ1**whenθ>θ*,
(3.7)∫xix|a(τ,x)|dτ=∫xiτ1**(-a(τ,x))dτ+∫τ1**xa(τ,x)dτ=2((wi-νi)θ-A)3θ3hi33((1-θ)ui+θwi)3-θ3hi33-2hi33qi(θ)[(1-θ)+θ((wi-νi)θ-A)(1-θ)ui+θwi]3×((1-θ)wi+θνi)+2hi3νiθ2(1-θ)qi(θ)[(1-θ)+θ((wi-νi)θ-A)(1-θ)ui+θwi]2.


## 3.2. Part 2

In this part, we discuss the properties of functionb(τ,x). Considerb(τ,x),τ∈[x,xi+1] as function ofτ. The roots of functionb(τ,x) are similar asa(τ,x)in Section 3.1 atτ=x. It is easy to show that whenθ≤θ*,b(x,x)≤0andθ≥θ*, b(x,x)≥0. The roots of quadratic functionb(τ,x)=0are
(3.8)τ2*=xi+1,τ2**=xi+1-2(1-θ)νihi(1-θ)wi+θνi.
The functionb(τ,x)varies from negative to positive on the rootτ2**when θ≤θ*. Thus,
(3.9)∫xxi+1|b(τ,x)|dτ=∫xτ2**(-b(τ,x))dτ+∫τ2**xi+1b(τ,x)dτ=8θ2(1-θ)3νi3hi33qi(θ)((1-θ)ui+θwi)2+hi3θ2(1-θ)33qi(θ)(wi(1-θ)-νi(3-θ)),
whenθ≥θ*,(3.10)∫xxi+1|b(τ,x)|dτ=∫xxi+1b(τ,x)dτ=hi3θ2(1-θ)33qi(θ)(νi(3-θ)-wi(1-θ)).
Thus, from (3.6) and (3.9), it can be shown that when 0≤θ≤θ*,(3.11)|f(x)-Si(x)|≤12‖f(3)(τ)‖∫xixi+1|Rx[(x-τ(x-τ)+2]|dτ=‖f(3)(τ)‖hi3p1(ui,vi,wi,θ),
where(3.12)p1(ui,νi,wi,θ)=(νi(3-θ)-wi(1-θ))(1-θ)3θ26qi(θ)+(wi-3νi)(1-θ)θ26qi(θ)+νiθ36qi(θ)-θ36+8θ2(1-θ)3νi36qi(θ)((1-θ)ui+θwi)2+θ2(1-θ)36qi(θ)(wi(1-θ)-νi(3-θ)),
and, from (3.7) and (3.10), it can be shown that when θ*≤θ≤1,(3.13)|f(x)-Si(x)|≤12‖f(3)(τ)‖∫xixi+1|Rx[(x-τ)+2]|dτ=‖f(3)(τ)‖hi3p2(ui,νi,wi,θ),
where(3.14)p2(ui,νi,wi,θ)=2((wi-νi)θ-A)3θ36((1-θ)ui+θwi)3-θ36-26qi(θ)[(1-θ)+θ((wi-νi)θ-A)(1-θ)ui+θwi]3×((1-θ)wi+θνi)+νiθ2(1-θ)qi(θ)[(1-θ)+θ((wi-νi)θ-A)(1-θ)ui+θwi]2+θ2(1-θ)36qi(θ)(νi(3-θ)-wi(1-θ)).Theorem 3.1.
For the positive free parametersui,νi,andwi, the error of interpolating rational cubic functionSi(x), for f(x)∈C3[x0,xn], in each subinterval Ii=[xi,xi+1] is
(3.15)|f(x)-Si(x)|≤12‖f(3)(τ)‖∫xixi+1|Rx[(x-τ)+2]|dτ=‖f(3)(τ)‖hi3ci,ci=max⁡0≤θ≤1p(ui,νi,wi,θ),
where
(3.16)p(ui,νi,wi,θ)={max⁡p1(ui,νi,wi,θ),0≤θ≤θ*max⁡p2(ui,νi,wi,θ),θ*≤θ≤1.Remark 3.2.
It is interesting to note that the rational cubic interpolation (2.1) reduces to standard cubic Hermite interpolation when we adjust the values of parameters asui=1,νi=1andwi=3. In this special case, the functionsp1(ui,νi,wi,θ)andp2(ui,νi,wi,θ) are
(3.17)p1(ui,vi,wi,θ)=4θ2(1-θ)33(3-2θ)2,0≤θ≤12,(3.18)p2(ui,νi,wi,θ)=4θ3(1-θ)23(1+2θ)2,12≤θ≤0,
respectively. Sinceci=max{max0≤θ≤0.5p1(ui,νi,wi,θ),max0.5≤θ≤0p2(ui,νi,wi,θ)}=1/96. This is the standard result for standard cubic Hemite spline interpolation.


## 4. Shape Preserving 2D Convex Data Rational Cubic Spline Interpolation

The piecewise rational cubic function (2.1) does not guarantee to preserve the shape of convex data. So, it is required to assign suitable constraints on the free parameters by some mathematical treatment to preserve the convexity of convex data.Theorem 4.1.
TheC1piecewise rational cubic function (2.1) preserves the convexity of convex data if in each subintervalIi=[xi,xi+1],i=0,1,2,…,n, the free parameters satisfy the following sufficient conditions:
(4.1)wi>max⁡{0,di+1νi(di+1-Δi),di+1νi(Δi-di),2uiνi(di+1-Δi)(di+1νi-Δiui),2uiνi(Δi-di)(Δiνi-diui),uiνi(di+1-di)Δi(ui+νi)},ui,νi>0.
The above constraints are rearranged as
(4.2)wi=li+max⁡{0,di+1νi(di+1-Δi),di+1νi(Δi-di),2uiνi(di+1-Δi)(di+1νi-Δiui),2uiνi(Δi-di)(Δiνi-diui),uiνi(di+1-di)Δi(ui+νi)},li≥0,ui,νi>0.Proof.
Let{(xi,fi),i=0,1,2,…,n} be the given set of convex data. For the strictly convex set of data, so
(4.3)Δ1<Δ2<Δ3<⋯<Δn-1.
In similar way for the concave set of data, we have
(4.4)Δ1>Δ2>Δ3>⋯>Δn-1.
Now, for a convex interpolationSi(x), necessary conditions on derivatives parametersdi should be in the form such that
(4.5)d1<Δ1<⋯<Δi-1<di<Δi<⋯<Δn-1<dn.
Similarly, for concave interpolation,
(4.6)d1>Δ1>⋯>Δi-1>di>Δi>⋯>Δn-1>dn.
The necessary conditions for the convexity of data are
(4.7)Δi-di≥0,di+1-Δi≥0.
Now a piecewise rational cubic interpolationSi(x) is convex if and only ifSi(2)(x)≥0,∀x∈[x1,xn], for x∈[xi,xi+1] after some simplification it can be shown that;
(4.8)Si(2)(x)=∑k=18θk-1(1-θ)8-kCikhi(qi(θ))3,
where
(4.9)Ci1=2νi2(wi(di+1-Δi)+diui-di+1νi),Ci2=4Ci1+6νi2(di+1νi-Δiui),Ci3=(Ci2-Ci1)+6νi{wi(di+1νi-Δiui)-2uiνi(di+1-Δi)},Ci4=(Ci3+Ci1-Ci2)+2wi{wi(Δi(ui+νi))-uiνi(di+1-di)}+14uiνi(di+1νi-diui),Ci5=(Ci6+Ci8-Ci7)+2wi{wi(Δi(ui+νi))-uiνi(di+1-di)}+14uiνi(di+1νi-diui),Ci6=(Ci7-Ci8)+6ui{wi(Δiνi-diui)-2uiνi(Δi-di)},Ci7=4Ci8+6ui2(Δiνi-diui),Ci8=2ui2(wi(Δi-di)+diui-di+1νi).
AllCik’s are the expression involving the parametersdi′s,Δi′s,ui′s,vi′s,andwi′s.
AC1piecewise rational cubic interpolant (2.1) preserves the convexity of data ifSi(2)(x)≥0.
Si(2)(x)>0 if both ∑k=18θk-1(1-θ)8-kCik>0andhi(qi(θ))3>0.
Sinceui,νi,wi are positive free parameters, sohi(qi(θ))3>0must be positive
(4.10)∑k=18θk-1(1-θ)8-kCik>0ifCik>0,k=1,2,3,4,5,6,7,8.
Hence,Cik>0,k=1,2,3,4,5,6,7,8if we have the following sufficient conditions on parameterwi:
(4.11)wi>max⁡{0,di+1νi(di+1-Δi),di+1νi(Δi-di),2uiνi(di+1-Δi)(di+1νi-Δiui),2uiνi(Δi-di)(Δiνi-diui),uiνi(di+1-di)Δi(ui+νi)}.
The above constraints are rearranged as
(4.12)wi=li+max⁡{0,di+1νi(di+1-Δi),di+1νi(Δi-di),2uiνi(di+1-Δi)(di+1νi-Δiui),2uiνi(Δi-di)(Δiνi-diui),uiνi(di+1-di)Δi(ui+νi)},li≥0,
whereΔi=(fi+1-fi)/hi.


## 5. Determination of Derivatives

Usually, the derivative values at the knots are not given. These values are derived either at the given data set{(xi,fi),i=0,1,2,…,n} or by some other means. In this paper, these values are determined by following arithmetic mean method for data in such a way that the smoothness of the interpolant (2.1) is maintained.


### 5.1. Arithmetic Mean Method

This method is the three point difference approximation with(5.1)di={0ifΔi-1=0orΔi=0,hiΔi-1+hi-1Δihi+hi-1otherwise,i=2,3,…n-1,
and the end conditions are given as
(5.2)d1={0ifΔ1=0orsgn⁡(d1)≠sgn⁡(Δ1),Δ1+(Δ1-Δ2)h1h1+h2otherwise,dn={0ifΔn-1=0orsgn⁡(dn)≠sgn⁡(Δn-1),Δn-1+(Δn-1-Δn-2)hn-1hn-1+hn-2otherwise.


## 5.1. Arithmetic Mean Method

This method is the three point difference approximation with(5.1)di={0ifΔi-1=0orΔi=0,hiΔi-1+hi-1Δihi+hi-1otherwise,i=2,3,…n-1,
and the end conditions are given as
(5.2)d1={0ifΔ1=0orsgn⁡(d1)≠sgn⁡(Δ1),Δ1+(Δ1-Δ2)h1h1+h2otherwise,dn={0ifΔn-1=0orsgn⁡(dn)≠sgn⁡(Δn-1),Δn-1+(Δn-1-Δn-2)hn-1hn-1+hn-2otherwise.


## 6. Numerical Examples

In this section, a numerical demonstration of convexity-preserving scheme given in Section4 is presented.Example 6.1.
Consider convex data set taken in Table1. Figure 1 is produced by cubic Hermite spline. We remark that Figure 1 does not preserve the shape of convex data. To overcome this flaw, Figure 2 is produced by the convexity-preserving rational cubic spline interpolation developed in Section 4 with the values of free parametersui=0.02,νi=0.02 to preserve the shape of convex data. Numerical results of Figure 2 are determined by developed convexity preserving rational cubic spline interpolation shown in Table 2.Table 1
Convex data set.
i12345678910x1.21.41.826121314.414.815y=f(x)181612102.22.233.57.21418Table 2
Numerical results of Figure2.
i12345678910di−10−10−10−9.6167−1.1681.08931.84213.811921Δi−10−10−10−1.950.0051.272.64291720—ui0.020.020.020.020.020.020.020.020.020.02vi0.020.020.020.020.020.020.020.020.020.02wi0.115.6295e0131.0827e0140.149320.120090.303860.444880.290.520.11Figure 1
Cubic Hermite spline scheme.Figure 2
Convexity shape-preserving rational cubic interpolation.Example 6.2.
Consider convex data set taken in Table3. Figure 3 is produced by cubic Hermite spline, and it is easy to see that Figure 3 does not preserve the shape of convex data. Figure 4 is produced by the convexity-preserving rational cubic spline interpolation developed in Section 4 with the values of free parametersui=0.02,νi=0.02 to preserve the shape of convex data. Numerical results of Figure 4 are determined by developed convexity preserving rational cubic spline interpolation shown in Table 4.Table 3
Convex data set [11].
i123456789x11.11.422.2451010.22y=f(x)105.54.22.520.6250.411.8Table 4
Numerical results of Figure4.
i123456789di−55.16−34.83−3.83−2.58−2.32−0.41−0.163.483.78Δi−45−4.33−2.83−2.5−0.76−0.220.123.63—ui0.020.020.020.020.020.020.020.020.02vi0.020.020.020.020.020.020.020.020.02wi0.142790.870.380.43680.111250.150860.262650.740.14279Figure 3
Cubic hermite spline scheme.Figure 4
Convexity shape-preserving rational cubic Interpolation.


## 7. Conclusion

In this paper, we have constructed aC1piecewise rational cubic function with three free parameters. Data-dependent constraints are derived to preserve the shape of convex data. Remaining two free parameters are left free for user’s choice to refine the convexity-preserving shape of the convex data as desired. No extra knots are inserted in the interval when the curve loses the convexity. The developed curve scheme has been tested through different numerical examples, and it is shown that the scheme is not only local and computationally economical but also visually pleasant.



---

*Source: 174048-2012-03-22.xml*