Monotonicity Preserving Interpolation using Rational Spline

Proceedings of the International MultiConference of Engineers and Computer Scientists 2011 Vol I,
IMECS 2011, March 16 - 18, 2011, Hong Kong
Monotonicity Preserving Interpolation using
Rational Spline
Muhammad Abbas,Ahmad.Abd Majid,Mohd Nain Hj Awang and Jamaludin.Md.Ali
Abstract—The main spotlight of this work is to visualize
the monotone data to envision of very smooth and pleasant
monotonicity preserving curves by using piecewise rational
cubic function. The piecewise rational cubic function has three
shape parameters in each interval. We derive a simpler constrains on shape parameters which assurance to preservation
of the monotonicity curve of monotonic data. The free shape
parameters will provide the extra freedom to the user to
interactively generate visually more pleasant curves as desired.
The smoothness of the interpolation is C 1 continuity.
Index Terms—Rational cubic function, monotone data, shape
parameters, free shape parameters, Interpolation.
I. I NTRODUCTION
S
Moothness and pleasant shape preserving curves is very
important in Computer aided Geometric design (CAGD),
Computer Graphics (CG), and Data Visualization (DV).In
these fields, it is often needed to produce a monotonicity
preserving interpolating curve corresponding to the given
monotone data. The one very important feature from the
interpolation methods is that make good judgment to study
is its positivity and monotonicity which are important
aspects of the shape. Many physical situations where
entities are taken only monotone. In [14], monotonicity is
applied in the specification of Digital to Analog Converters
(DACs), Analog to Digital Converters (ADCs) and sensors.
These devices are used to control system applications where
non monotonicity is not acceptable. In cancer patients,
Erythrocyte sedimentation rates (ESR) and Uric acid level
in the patients who are suffering from gout are providing
monotone data see[14]. Approximation of couples and quasi
couples in statistics see [16], rate of dissemination of drug
in blood see [16], empirical option of pricing models in
finance see [16] are good examples of monotone data. Also
in Engineering, the study of tensile strength of the material
which give the monotone data because the tensile strength
of a material can be defined as the maximum force that a
material can withstand before breaking see for detail[12].
The forced applied usually is called stress and is studied
alongside the stretch of the material referred as strain. So
the data from these two entities is always monotone see for
detail [12].
Manuscript received September 03, 2010; revised December 31, 2010.
This work was fully supported by the Universiti Sains Malaysia under Grant
FRGS(203/PJJAUH/6711120).
Muhammad Abbas is with the School of Mathematical Sciences,Universiti
Sains Malaysia,USM 11800 Pulau Pinang, Malaysia, Corresponding
E-mail:[email protected].
Ahmad.Abd Majid is with the School of Mathematical Sciences,Universiti
Sains Malaysia,USM 11800 Pulau Pinang, Malaysia.
Mohd Nain Hj Awang is with the School of Distance Education, Universiti
Sains Malaysia,USM 11800 Pulau Pinang, Malaysia.
Jamaludin.Md.Ali is with the School of Mathematical Sciences,Universiti
Sains Malaysia,USM 11800 Pulau Pinang, Malaysia.
ISBN: 978-988-18210-3-4
ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online)
The problem of monotonicity preserving has been
considered by number of authors [1]-[19] and references
therein. Hussain & Sarfraz [1] has developed monotonicity
preserving interpolation by rational cubic function with
four shape parameters which are arranged as two are free
and the other two are automated shape parameters. The
authors derived data dependent constraints on automated
shape parameters which ensure the monotonicity and also
provide very pleasant curves but one automated shape
parameter is dependent on the other and hence the scheme
is economically very expensive.
Fritch & Carlson [2] and Butland [3] have developed
a piecewise cubic polynomials monotonicity preserving
interpolation. With positive derivatives and increasing data
in the cubic Hermite Polynomials they still violate the
necessary monotonicity condition. These authors are made
a modification in input derivatives in their interpolating
schemes if they contravene the necessary monotonicity
conditions. Schumaker [5] developed a very economical
interpolation by piecewise quadratic polynomial but the
author also for interpolation they put in an extra knot
in each interval. The constructed interpolant preserve the
monotonicity but have degree 2.Butt [18] & Higham [4]
also used a piecewise cubic polynomials in which the
derivatives are not modified but the authors inserted extra
knots where the curve lost the monotonicity. Gregory &
Delbourgo [6] has introduced a solution of monotonicity
without inserting an extra knot and preserves monotonicity
by rational quadratic function with quadratic denominator.
Fahr and Kallay [7] used a monotone rational B-spline of
degree one to preserve the shape of monotone data.
For the pithiness of monotonicity preserving interpolation
the reader is referred to: Delbourgo & Gregory [8] has
developed piecewise rational cubic interpolation for the
preserving monotonicity with no freedom to user to refine
the curve. Gregory & Sarfraz [9] introduced a rational
cubic spline with one tension parameter in each subinterval.
Sarfraz [10] & [11], Hussain & Hussain [12] and Sarfraz
& Hussain [13], Sarfraz et al [17] have introduced rational
cubic function with two shape parameters that provide
the desired monotone curves but there is no freedom for
the user to modify the curves hence is may be unsuitable
for interactive design. Hussain et al [14] also developed
a rational function for the preserving monotonicity with
single shape parameter which is very economical and
generates pleasant curve but have limited flexibility in
particular curves modification. Sarfraz [15] introduced
an C 2 interpolant using a general piecewise rational
cubic (GPRC) with two shape parameters to preserves
the monotonicity but there is also no freedom to the user
IMECS 2011
Proceedings of the International MultiConference of Engineers and Computer Scientists 2011 Vol I,
IMECS 2011, March 16 - 18, 2011, Hong Kong
as well as the scheme is expansive than the proposed scheme.
This work is particularly concerned with the monotone
data using the cubic rational function with three shape
parameters, they are arranged in such a manner that two
shape parameters are provide extra independence to the
user to modify the curve as desired and the other one is
constrained to satisfy the monotonic properties of curves
through monotone data. In section (I-C), we show how the
single parameter produces monotonicity preserving curve
through monotone data which are given in Tables I,II and
III, also providing an interactive and pleasant curve as
compared to [14] while the other two shape parameters
are used to refine the curve as desired by the user. In the
proposed scheme there is no insertion of extra knot and is
also more economical as compared to the existing schemes.
The rest of this paper is organized as follows. we construct
a rational cubic function in section (I-A) and the determination of the derivatives is given in section (I-B). The
construction of the monotonicity preserving interpolation for
monotone data in section (I-C) and some numerical examples
are discussed in section (I-D). Finally the conclusion of the
paper is discussed in section (II).
A. Rational cubic function
In this section, a C 1 rational cubic function [19] with
three shape parameters with cubic denominator has been
developed. Let {(xi , fi ) , i = 0, 1, 2, ........n} be a given set
of data points defined over the interval [a, b], where a =
x0 < x1 < ......... < xn = b. The C 1 piecewise rational
cubic function with three parameters are defined over each
subinterval Ii = [xi , xi+1 ], i =0, 1, 2,. . . ,n -1 as:
S(x) = Si (x) =
pi (θ)
qi (θ)
(1)
with
pi (θ) = ui fi (1 − θ)3 + (wi fi + ui hi di ) θ (1 − θ)2
+ (wi fi+1 − vi hi di+1 ) θ2 (1 − θ) + vi fi+1 θ3
qi (θ) = ui (1 − θ)3 + wi θ(1 − θ) + vi θ3
where
hi = xi+1 − xi , ∆i =
fi+1 − fi
hi
(2)
(x − xi )
,0 ≤ θ ≤ 1
(3)
hi
The rational cubic function (1) has the following properties,
θ=
S(xi ) = fi , S(xi+1 ) = fi+1
S 0 (xi ) = di , S 0 (xi+1 ) = di+1
(4)
Where S 0 (x) denotes the derivative with respect to ‘x’ and
di denotes the value of the derivative at the knots xi . It is
very easy to prove the existence and uniqueness of the interpolation for given data (xi , fi ) with parameters ui , vi , wi .
It is interesting that when ui = 1, vi = 1 and wi = 3 in
each interval Ii , the piecewise rational cubic functions (1)
reduce to the standard cubic Hermite interpolation shown in
(5).
Si (x) = (1 − θ)2 (1 + 2 θ) fi + θ2 (3 − 2 θ) fi+1
+ θ (1 − θ)2 hi di − θ2 (1 − θ) hi di+1
ISBN: 978-988-18210-3-4
ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online)
(5)
In this paper, ui , vi are free parameters which can be used
freely for the modification of the curve and wi be the
automated shape parameter which preserves the monotonicity
of monotone data.
B. Determination of Derivatives
Mostly the derivative values or parameters {di } are not
given then it has been derived by two means which one
from the give data set (xi , fi ), i = 1, 2, 3, ........., n or by
some other methods. In this paper, we are determined from
the given data for the smoothness of interpolant (1). These
methods are the approximation based on many mathematical
theories.The following two method are borrowed from Hussain & Sarfraz [1]. The descriptions of such approximations
are as follow:
1) Arithmetic Mean Method: This method is the three
point difference approximation with
½
0
if ∆i−1 = 0 or ∆i = 0
di =
d∗i otherwise , i = 2, 3, .....n − 1
(6)
And the end conditions are given as,
½
0 if ∆1 = 0 or sgn(d∗1 ) 6= sgn(∆1 )
d1 =
otherwise
d∗1
(7)
½
0 if ∆n−1 = 0 or sgn(d∗n ) 6= sgn(∆n−1 )
dn =
otherwise
d∗n
(8)
Where
d∗i = (hi ∆i−1 + hi−1 ∆i )/(hi + hi−1 )
d∗1 = ∆1 + (∆1 − ∆2 )h1 /(h1 + h2 )
d∗n = ∆n−1 + (∆n−1 − ∆n−2 )hn−1 /(hn−1 + hn−2 )
2) Geometric Mean Method: These are non-linear approximations which are defined as:
½
0, if ∆i−1 = 0 or ∆i = 0
di =
hi /hi−1 +hi hi−1 /hi−1 +hi
∆i−1
∆i
, i = 2, 3, 4, ..., n − 1
(9)
The end conditions are given as:

−f1
 0, if ∆1 = 0 or ∆3,1 = xf3 −x
=0
3
1
n
o
h1 /h2
d1 =
(10)
1

∆1 ∆∆3,1
, otherwise

n−2
 0, if ∆n−1 = 0 or ∆n,n−2 = xfn −f
=0
−x
n
ohn−1 /hn−2 n n−2
dn =
∆
n−1

∆n−1 ∆n,n−2
, otherwise
(11)
C. Monotonicity Preserving Interpolation
The rational cubic function in section (I-A) does not
provide a guarantee to preserves monotonicity curve of the
monotone data (see Fig.1, Fig.4 & Fig.7). It appears that cubic Hermite spline scheme does not provide the desired shape
features thus some further treatment is required to attain a
pleasant and interactive shape from the given monotone data.
To proceed with this approach, some mathematical treatments are required which will be shown in the following
steps.
Let (xi , fi ), i = 1, 2, 3, ..., n be a given monotone data set,
IMECS 2011
Proceedings of the International MultiConference of Engineers and Computer Scientists 2011 Vol I,
IMECS 2011, March 16 - 18, 2011, Hong Kong
where x1 < x2 < x3 < ... < xn . Thus for monotone
increasing(use same approach for monotone decreasing data)
fi ≤ fi+1 , i = 1, 2, 3, ..., n
(12)
Suppose hi = xi+1 − xi , ∆i = (fi+1 − fi )/hi and di , i =
1, 2, 3, ..., n be the derivative values at xi , i = 1, 2, 3, ..., n .
Moreover, for the monotonic interpolation Si (x) , it is then
necessary that the derivative should be as given below
For ∆i = 0,
di = di+1 = 0
(13)
And for ∆i 6= 0 ,
sgn(di ) = sgn(di+1 ) = sgn(∆i )
(14)
The main focus to preserve the monotonicity of rational
function (1) is to assign suitable values to shape parameters
ui , vi & wi .
We are discussing two cases for monotonicity preserving
interpolation.
1) Case.1: When we have ∆i = 0 , then di = 0 .In this
case S(x) reduces to
Si (x) = fi
∀x ∈ [xi , xi+1 ]
(15)
summarized as:
Theorem 1.1: The piecewise C 1 rational cubic interpolant S(x) , defined over the interval [a,b] in (1), is preserve
the monotonicity if in each subinterval Ii = [xi , xi+1 ] , the
following sufficient
conditions are satisfied: o
n
di+1
i di+1
wi > max 0, u∆i dii , vi∆
, ui di +v
∆i
i
The above result
n can be rearranged as:
o
di+1
ui di +vi di+1
wi = li + max 0, u∆i dii , vi∆
, li > 0
,
∆i
i
D. Numerical Examples
1) : In this example, the monotone data is taken from [1]
as shown in Table I. Fig.1 is the curve generated by using
cubic Hermite spline scheme with this monotone data, but
does not preserve the monotonicity. To remove this obscurity,
we show the visualization of the same monotone data in Fig.2
with ui = vi = 0.1 & Fig.3 with ui = vi = 3.0 using
developed rational cubic interpolation scheme in section
(I-C) to preserve the shape of monotone data. Fig.3 is the
improvement of Fig.2 which is visually more pleasant curve.
So is a monotone.
2) Case.2: When we have ∆i 6= 0 , and then Si (x) is
(1)
monotonically increasing if and only if Si (x) ≥ 0 ∀ x ∈
(1)
[xi , xi+1 ] .So we calculate Si (x) which after simplification
is given as
P6
(1 − θ)6−k θk Ak,i
(1)
Si (x) = k=1
(16)
2
{qi (θ)}
TABLE I
M ONOTONE DATA
i
xi
fi
1
0
0
Where
3
10
15
4
29.5
25
5
30
30
30
vi2 di+1
=
= A1,i + 2 vi (wi ∆i − di ui )
= A2,i − A1,i + 3ui vi ∆i + wi (wi ∆i − ui di − vi di+1 )
= A5,i − A6,i + 3ui vi ∆i + wi (wi ∆i − ui di − vi di+1 )
= A6,i + 2 ui (wi ∆i − di+1 vi )
= u2i di
25
20
15
y−axis
A1,i
A2,i
A3,i
A4,i
A5,i
A6,i
2
6
15
10
5
0
So Si1 (x) ≥ 0
∀x ∈ [xi , xi+1 ], if
Ak,i ≥ 0 ,
−5
k = 1, 2, 3, ...., 6
−10
0
5
10
15
x−axis
20
25
30
15
x−axis
20
25
30
Where the necessary conditions
di ≥ 0 , di+1 ≥ 0, ui ≥ 0 & vi ≥ 0
(17)
Fig. 1.
Cubic Hermite Spline
must be hold.
It is obvious that both A1,i & A6,i are positive from
(17).However,A2,i ≥ 0 if
wi >
ui di
∆i
30
25
(18)
20
y−axis
Similarly, A5,i ≥ 0, if
wi >
vi di+1
∆i
(19)
10
5
Finally, both A3,i & A4,i are positive if
wi >
ui di + vi di+1
∆i
0
(20)
So constraints on wi are efficient & reasonably acceptable
choice to use the condition given above in (18- 20) can be
ISBN: 978-988-18210-3-4
ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online)
15
Fig. 2.
0
5
10
Developed piecewise rational cubic function with ui = vi = 0.1
IMECS 2011
Proceedings of the International MultiConference of Engineers and Computer Scientists 2011 Vol I,
IMECS 2011, March 16 - 18, 2011, Hong Kong
30
90
80
25
70
20
y−axis
y−axis
60
15
50
40
10
30
5
20
0
Fig. 3.
0
5
10
15
x−axis
20
25
10
30
Developed piecewise rational cubic function with ui = vi = 3
Fig. 6.
5
10
x−axis
15
Developed piecewise rational cubic function with ui = vi = 7
2) : The monotone data is taken from [1] as shown in
Table II. Fig.4 is generated by cubic Hermite spline which
loses the monotonicity. To remove this flaw, we show the
visualization of the same monotone data in Fig.5 with ui =
vi = 0.1 & Fig.6 with ui = vi = 7.0 using developed
rational cubic interpolation which nicely preserve the shape
of monotone data. Fig.6 is the improvement of Fig.5 which
is also visually more pleasant curve.
3) : In this example, the monotone data is taken from [14]
as shown in Table III. Fig.7 is generated by cubic Hermite
spline scheme which does not preserve monotonicity. Fig.8
with ui = vi = 0.1 & Fig.9 with ui = vi = 3.0 are generated
by developed rational cubic interpolation given in section
(I-C) that preserve the shape of monotone data. However,
Fig.9 which is the improvement of Fig.8 is visually more
pleasant curve.
TABLE II
M ONOTONE DATA
TABLE III
M ONOTONE DATA
i
xi
fi
1
5
10
2
6
11
3
11
15
4
12
50
5
15
85
i
xi
fi
90
1
1760
500
2
2650
1360
3
2760
2940
3000
80
2500
70
2000
60
1500
y−axis
y−axis
50
40
1000
30
500
20
0
10
−500
0
−10
Fig. 4.
5
10
x−axis
−1000
1600
15
Cubic Hermite Spline
Fig. 7.
1800
2000
2200
x−axis
2400
2600
2800
2400
2600
2800
Cubic Hermite Spline
90
3000
80
2500
70
2000
y−axis
y−axis
60
50
1500
40
30
1000
20
10
Fig. 5.
5
10
x−axis
500
1600
15
Developed piecewise rational cubic function with ui = vi = 0.1
ISBN: 978-988-18210-3-4
ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online)
Fig. 8.
1800
2000
2200
x−axis
Developed piecewise rational cubic function with ui = vi = 0.1
IMECS 2011
Proceedings of the International MultiConference of Engineers and Computer Scientists 2011 Vol I,
IMECS 2011, March 16 - 18, 2011, Hong Kong
3000
2500
y−axis
2000
1500
1000
500
1600
Fig. 9.
1800
2000
2200
x−axis
2400
2600
2800
Developed piecewise rational cubic function with ui = vi = 3
II. C ONCLUSION & S UGGESTIONS
In this work the problem of shape preserving of monotonicity curves which is nicely controlled by piecewise ration
cubic spline is proposed. Simple data dependent constraints
are developed in the description of rational cubic function
with three shape parameters with two are free shape parameters provided to the user to refine the shape as desired and
other one is the automated shape parameter. The advantageous features on the existing schemes are: no extra knots
are inserted to preserve the monotonicity of monotone data.
The schemes [10], [11], [12], [13] and [17] are developed
by using rational cubic function with two shape parameters
that generates a nice monotonicity preserving curves but they
have no degree of freedom. The method [14] is developed
by using rational cubic function with single shape parameter
to preserve the monotonicity but also has limited flexibility
of the curves. Further, unlike [10], no derivative constraints
are imposed. So, the our method applies on equally to data
or data with given derivatives. The method developed in this
paper is not only local and computationally economical but
visually pleasant and interactive as well. Thus the method in
section (I-C) is more flexible and may be more suitable for
interactive CAD. Extension to monotone surfaces is under
process.
[10] M.Sarfraz,”A rational spline for the visualization of monotone
data”,Comput.Graph.24(2000),pp.509-516
[11] M.Sarfraz, ”A rational spline for the visualization of monotone data:
alternative approach”, Comput.Graph, 27(2003), pp.107-121.
[12] M.Z.Hussain and M.Hussain, ”Visualization of data preserving monotonicity”, Appl.Math.Comput.190 (2007), pp. 1353-1364.
[13] M.Sarfraz and M.Z.Hussain, ”Data visualization using rational spline
interpolation”, J.Comput.Appl.Math.189 (2006), pp.513-525.
[14] M.Z.Hussain,M.Sarfraz and M.Hussain, ”Scientific data visualization with shape preserving C 1 rational cubic interpolation”,3(2)
(2010),pp.194-212.
[15] M.Sarfraz, ”A C 2 rational cubic spline alternative to the NURBS”,
Comput.Graph.24 (2000), pp. 509-516.
[16] G.Beliakov, ”Monotonicity preserving approximation of multivariate
scattered data”, BIT, 45(4), (2005), 653-677.
[17] M.Sarfraz,S.Butt and M.Z.Hussain, ”Visualization of shaped data by a
rational cubic spline interpolation”,Comput.Graph.25(5)(2001),pp.833845.
[18] S.Butt,”shape preserving curves and surfaces for computer graphics”, Ph.D. Thesis, School of computer studies ,University of
Leeds,Leeds,England,1991.
[19] M.Abbas,J.M.Ali and A.A.majid, ”A rational spline for preserving
the shape of positive data”,Proc.IEEE,2010 International Conference
on Intelligence and Information Technology,Oct 28-30,(2010),Lahore
Pakistan VI.pp 253-257.
ACKNOWLEDGMENT
The authors are grateful to the anonymous referees for
their helpful, valuable comments and suggestions in the
improvement of this manuscript.
R EFERENCES
[1] M.Z.Hussain and M.Srafraz,”Monotone piecewise rational cubic
interpolation”,International.J.Comput.Math.86(2009),pp.423-430
[2] F.N.Fritch and R.E.Carlson, ”Monotone piecewise cubic interpolation”,SIAM J.Numer.Anal.17(2) (1980),pp.238-246
[3] F.N.Fritch
and
J.Butland,
”A
method
for
constructing
local
monotone
piecewise
cubic
interpolation”,SIAM
J.Sci.Stat.Comput.5(1984),pp.300-304
[4] D.J.Higham, ”Monotone picewise cubic interpolation with applications
to ODE plotting”,J.Comput.Appl.Math.39(1992),pp.287-294
[5] L.L.Schumaker, ”On shape preserving quadratic spline interpolation”,SIAM J.Num.Anal.20(1983),pp.854-864
[6] J.A.Gregory and R.Delbourgo, ”Piecewise rational quadratic interpolation to monotone data”,SIAM J.Numer.Anal.3(1983),pp.141-152
[7] R.D.Fahr and M.Kallay, ”Monotone linear rational spline interpolation”,Comput.Aided Geomet.Design 9(1992), pp.313-319
[8] R.Delbourgo and J.A.Gregory, ”Shape preserving piecewise rational
interpolation”, SIAM J.Stat.Comput.6(1985),pp. 967-976
[9] J.A.Gregory and M.Sarfraz , ”A rational spline with tension”, Comput.Aided Geomet.Design 7(1990),pp.1-13
ISBN: 978-988-18210-3-4
ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online)
IMECS 2011