Você está na página 1de 4

2010 International Conference on Digital Manufacturing & Automation

A rational cubic spline interpolation and its application


Meng Tian , Qiuju Bian
School of science, Shandong University of Technology, Zibo, shandong, 255049, P.R.China luckywalter@163.com

AbstractIn this paper, a rational cubic spline interpolation has been constructed using the rational cubic spline with quadratic denominator and the rational cubic spline based on function values. The spline can preserve monotonicity and convexity of the data set. The explicit representation is easily constructed, and numerical experiments indicate that the method produces visually pleasing curves. Also, error analysis of the spline is studied. Keywords-rational spline;monotonic;convex; error

where d i are the derivative values at the knots xi , ui , vi are named shape parameters, and ui , vi > 0 .The rational cubic interpolant has the following interpolatory properties:
S(xi ) = fi , S(xi +1 ) = fi +1, S(xi ) = di , S(xi +1 ) = di +1,

In most application, derivative parameters d i are not given and hence must be determined from the data ( xi , f i ) . An obvious choice is mentioned here
di = (hi i1 + hi1i )/(hi + hi1), d1 = 1 + (1 2 )h1 /(h1 + h2 ), dn = n1 + (n1 n2 )hn1 /(hn2 + hn1). i = 2,", n 1,

I.

INTRODUCTION

(2)

In computer graphics and in particular CAD environments, a user is usually in need of visualizing scientific data, through a curve representation, which possesses certain characteristic like positivity, monotonicity, convexity. The problem of shape preserving interpolation has been considered by a number of authors in recent years. Brodlie and Butt [1] and Delbourgo [2] have discussed the piecewise cubic interpolation of convex data. Gregory and Delbourgo [3] consider the piecewise interpolation to monotonic data. Qi Duan [4] has studied some approximation properties of some typical cubic spline, especial the rational cubic spline with liner denominator. In has this paper, a shape preserving interpolant has been discussed for monotonic data and convex data, using rational cubic spline with quadratic denominator. The theory of method, in this paper, has number of advantageous features. It is C1 . No additional restriction needed to exert on the data. The interpolant is not concerned with an arbitrary degree, and when the shape parameters are selected, the curve representation is unique in its solution. The shape preserving curve based on function value only can be obtained automatically and the interpolant is stable. II. THE RATIONAL CUBIC INTERPOLANT Let {( x , f ), i = 1, 2,", n} be a given set of data points, i i where x1 < x2 < " < xn , and fi are the function values at the knots

This method is based on three-point difference approximation for the d i . A Newton series expansion analysis shows that f i d i = O ( h 2 ), h = max( hi ) [2]. For given bounded data, the derivative approximation Eq.(2) are bounded. Hence, for bounded values of the appropriate shape parameters ui , vi , the interpolant Eq.(1) is bounded and unique. III. MONOTONICITY PRESERVATION ANALYSIS

For simplicity of presentation, let us assume monotonic increasing set of data, so that f1 f 2 " f n .let i = ( f i +1 f i ) / hi , obviously i 0, i = 1, 2," , n 1. For a monotonic increasing interpolant S ( x) , it is necessary that the derivative parameters should be such that di 0, i = 1, 2," , n. S ( x) is monotonically increasing if and only if S ( x) 0 . After some simplification, that
S ( x ) =

C
j =1

j ,i

j 1

(1 ) 5 j ,

[ Q i ( )] 2

(3)

where
C1,i = vi2 d i , C 2, i = 2u i vi [(2 vi + 1) i d i +1 ], C3, i = 2ui vi (ui + vi ) i + (2u i vi ) 2 i + 4u i vi i ui vi ( d i + d i +1 ) - 2u i vi (u i d i +1 + vi d i ), C 4, i = 2u i vi [(2ui + 1) i d i ], C5, i = u i2 d i +1 .

xi . For x [ xi , xi +1 ] , Let hi = xi +1 xi ,

(0 1) .A piecewise rational cubic function S ( x) is defined for x [ xi , xi +1 ] as

= ( x xi ) / hi ,
Si ( x) = Pi ( ) Qi ( )

(4)

(1 ) 3 vi f i + (1 ) 2 [(2ui vi + vi ) f i + vi hi d i ] = + 2 (1 )[(2u i vi + u i ) f i +1 u i hi d i +1 ] + 3 u i f i +1 . (1 ) 2 vi + 2ui vi (1 ) + 2 u i

(1)

For the selection of ui , vi > 0 , the denominator in Eq.(3) is positive, therefore the conditions for monotonicity on [ xi , xi +1 ] are C j , i 0, j = 1, 2," , 5. Thus, from Eq.(4) we have the sufficient conditions for monotonicity preservation:
96

978-0-7695-4286-7/10 $26.00 2010 IEEE DOI 10.1109/ICDMA.2010.90

(2 v i + 1) i d i + 1 0 4 u i v i i 2 v i d i 2 u i d i +1 0 (2 u i + 1) i d i 0 Which lead to the following constraints:


ui di d , vi i + 1 . i i
i
di ui vi

TABLE II.

Values of ui , vi , di for rational interpolation

1
0 -

2
0 20.500 2.788

3
3.417 0.845 0.067

4
3.803 2.455 5.705

5
2.408 0.609 0.044

6
2.997 21.444 5.826

7
13.403 0.947 1.107

8
16.597 ---

(5)

One can make the choice of ui and vi to be the greatest lower bound as follows: d d (6) u i = i , vi = i +1 . i i One can also get an alternative choice as follows: d + d i +1 u i = vi = i . 2 i It should be noted that if i = 0, then it is necessary to set

IV.

CONVEXITY PRESERVATION ANALYSIS

We assume a strictly convex set of data {( xi , f i ), i = 1, 2," , n} , so that 1 < 2 < " < n 1 . To have a convex interpolant S ( x) , and to avoid the possibility of S ( x) having straight line segments, it is necessary that the derivative parameters d i should satisfy d1 < 1 < " i 1 < di < i " < n 1 < d n . (7) Now S ( x) is convex if and only if S ( x) 0 . After some simplification, it can be shown that
S ( x ) =

di = di +1 = 0 ,thus S ( x) = fi = f i +1 , is a constant on [ xi , xi +1 ] . For the case where the data is monotonic but not strictly monotonic it would be necessary to divide the data strictly into monotonic parts. In a similar fashion one can deal with monotonic decreasing data, and the same result can be hold. We consider a set of monotonic data shown in Table 1 (a data taken randomly). For the demonstration of C1 monotonic rational cubic curve scheme, the derivatives di , s will be computed with Eq.2. The result of applying the piecewise rational cubic scheme to the given data, with the choice of the shape parameters ui , s, vi , s described in Eq.6, is shown in Fig.1. Table 2 shows values of ui , vi , di for rational interpolation in Fig.1.
TABLE I. MONOTONIC DATA SET TAKEN AT RANDOM

B
j =1

ji

j 1

(1 ) 6 j ,

hi [ Q i ( )]3

(8)

Where B1,i = vi2[4ui vi (i di ) + 2ui (i di+1)],


B2,i = 8uivi3 (i di ) + 4ui vi2 (i di+1 ) + 6ui vi2 (i di ), B3,i = 6ui2vi (di+1 i ) + 4ui vi3 (i di ) +12ui vi2 (i di ) + 2ui vi2 (i di+1 ), B4,i = 6ui vi2 (i di ) + 4ui3vi (di+1 i ) +12ui2vi (di+1 i ) + 2ui2vi (di i ), B5,i = 8ui3vi (di+1 i ) + 6ui2vi (di+1 i ) + 4ui2vi (di i ), B6,i = 4ui3vi (di+1 i ) + 2ui2vi (di i ),

(9)

i
xi fi

1 0.0 10.0

2 2.0 10.0

3 5.0 10.5

4 6.0 15.0

5 10.5 18.0

6 17.0 50.0

7 25.0 55.0

8 26.0 70.0

For the selection of ui , vi > 0 , the denominator in Eq.(8) is positive, therefore the conditions for convexity on [ xi , xi +1 ] are B j ,i 0, j = 1, 2," , 6. Thus, from Eq.(9) we have the sufficient conditions for convexity preservation:
ui i di d i , vi i +1 . 2( d i + 1 i ) 2( i d i )

(10)

One can make the choice of

ui and vi to be the greatest

lower bound as follows: i di d i +1 i (11) , vi = . ui = 2 ( d i +1 i ) 2( i di ) It should be noted that if i di = 0 or di +1 i = 0 then it is necessary to set di = di +1 = i .The interpolant then will be liner in that region, i.e., Si ( x) = f i (1 ) + f i +1 . We consider a set of convex data shown in Table 3 (a data taken randomly). For the demonstration of C1 convex rational cubic curve scheme, the derivatives di , s will be computed with Eq.2. The result of applying the piecewise rational cubic scheme to the given data, with the choice of

Figure 1. The monotonicity-preserving interpolation curve for data in Table 1

97

the shape parameters ui , s, vi , s described in Eq.11, is shown in Fig.2. We can see the convexity preserving interpolatory spline curves. So it demonstrates nice looking visually pleasant and accurate result. Table 4 shows values of ui , vi , di for rational interpolation in Fig.2.
TABLE III.
CONVEX DATA SET TAKEN AT RANDOM

Lemma 1 let i = max(ui , vi ), then

3 | Qi ( ) | i ,| Qi( ) | 2i ,| Qi( ) | 4i ,| Qi ( ) | . 8 Proof. Obviously, Qi ( ) | i . 1 1 1 1 | Qi( ) |=| ( ) + (2ui 1 + ) || 2ui | 2i . 2 2ui 2ui 2 | Qi( ) |= 2ui 1 + When =
2 i

i
xi fi

1 1.0 0.0

2 3.0 5.5

3 12.0 7.0

4 13.0 7.1

5 13.5 7.12

6 15.0 7.15

1 4i . 2ui

1 ui , Qi ( ) obtain the minimum, 4u 2ui + 1

| Qi ( ) |=|

(1 ) 2 + 2ui (1 ) + 4ui2 2 3 | . 4ui 8

Theorem 2 Let f C 4 [ x1 , xn ] and S ( x) be the piecewise rational function such as S(xi ) = fi , S(xi ) = di , i = 1,2,!, n. Then

for x [ xi , xi +1 ] . | f ( x) S ( x) | Where i = max(ui , vi ), E ( f ) = [hi3 || f (4) || +8hi2 || f (3) || +24hi || f (2) ||].
Proof. Let x( ) = xi + hi , Fi ( ) = f ( x( )), then
Figure 2. The convexity-preserving interpolation Curve for data in Table 3 TABLE IV. Values of ui , vi , di for rational interpolation

2i hi E ( f ) ( + i ) 3 96

f ( x) S ( x) = Fi ( )

Pi ( ) , 0 1. Qi ( )

i
di ui vi

1 10.500 1.910 0.500

2 0.720 4.429 0.054 V.

3 0.104 6.000 5.121

4 0.050 0.625 0.548

5 0.0320 0.800 0.254

6 0.0125 ---

Secondly, P ( ) F ( )Qi ( ) N ( ) + N ( ) Pi ( ) | Fi ( ) i || i |. Qi ( ) Qi ( ) Where N i ( ) = vi f i (1 )3 + [(2ui vi + vi ) f i + vi hi f i ] (1 ) 2 + [(2ui vi + ui ) f i +1 ui hi f i 1 ] 2 (1 ) + ui f i +1 3 . +

ERROR ANALYSIS

This section develops the error bound for the rational function .Sarfraz [5] get the following results. Theorem 1 Let f C 4 [ x1 , xn ] and S ( x) be the piecewise rational function such as S(xi ) = fi , S(xi ) = di , i = 1,2,!, n. Then for x [ xi , xi +1 ] . | f ( x) S ( x) |

N i ( ) is the cubic Hermite interpolation to Fi ( )Qi ( ) , and bounding the Cauchy remainder of the interpolation gives | Fi ( )Qi ( ) N i ( ) |
Then

i hi E ( f ) + i ) ( 2ii 96

Where i = max(ui , vi ), i = max( i , i +1 ), i =| f i | di , i = min || f ( x) ||, i = min(ui , vi ), E ( f ) = [hi3 || f (4) || Ai ( f ) + 16hi2 i || f (3) || +24hi i || f (2) ||]. For convexity preserving, i di d i +1 i , vi = . ui = 2 ( d i +1 i ) 2( i di ) So we can get

1 d4 max | 4 Fi ( )Qi ( ) | 384 0 1 d 1 (4) (3) (2) max | Fi ( )Qi ( ) + 4 Fi ( )Qi( ) + 6 Fi ( )Qi( ) | 384 0 1 1 {hi4 || f (4) || i + 8hi3 || f (3) || i + 24hi2 || f (2) ||} 384 h i i {hi3 || f (4) || +8hi2 || f (3) || +24hi || f (2) ||} 384 i hi E ( f ) . 384 and

98

| N i ( ) Pi ( ) | =| (1 )hi [vi (1 )( f i di ) + ui (di +1 f i 1 )] | + hi i max{| f i di |,| f i 1 di +1 |} + . 4 i hi i . 4 Let x [ xi , xi +1 ] , we obtain | f ( x) S ( x) |= O (hi2 ) . VI. CONCLUDING REMARKS

parameters as in the case of ordinary rational spline having some control on the curves. REFERENCES
[1]

[2]

[3]

A ratinal cubic interpolant, with two families of shape parameters, has been utilized to obtain C1 monotonicity preserving and convexity preserving interpolatory spline curves. The solution to the shape preserving spline exists and provides a unique solution. Error analysis shows this kind of interpolation is stable. The rational spline scheme has been implemented successfully and it demonstrates nice looking visually pleasant and accurate result. The user has not to be worried about struggling and looking for some appropriate choice of

[4]

[5] [6]

[7] [8]

K.W. Brodlie, S.Butt, Preserving convexity using piecewise cubic interpolation, Computers and Graphics, 1991,15:15-23. R.Delbourgo, Shape preserving interpolation to convex data by rational functions with quadratic numerator and linear denominator,IMA J.Numer.Anal., 1989,9: 123-136. J.A.Gregory, R.Delbourgo, Piecewise rational quadratic interpolation to monotonic data, IMA Journal of Numerical Analysis, 1982, 2:123-130. Q.Duan, K.Djidjeli, W.G.Price, E.H.Twizell, A rational cubic spline based on function values, Computers and Graphics,1998,22:479486. M.Sarfraz, A rational cubic spline for the visualization of monotonic data, Computers and Graphics, 2000, 24:509-516. M.Sarfraz, Visualization of positive and convex data by a rational cubic spline interpolation, Information Sciences, 2002, 146:239254. R.H.Wang, G.Q.Zhu, Rational function approximation and its application, Science Press, Beijing, 2004, 290-309. (in Chinese) Tian Meng, Li Shilong, Convexity-preserving piecewise rational cubic interpolation, Journal of Shandong University, 2007,10:80-83. (in Chinese)

99

Você também pode gostar