Paper Menu >>
Journal Menu >>
Vol.2, No.6, 641-645 (2010) Natural Science http://dx.doi.org/10.4236/ns.2010.26080 Copyright © 2010 SciRes. OPEN ACCESS A simple 2-D interpolation model for analysis of nonlinear data Mehdi Zamani Department of Civil Engineering, Faculty of Technology and Engineering, Yasouj University, Yasouj, Iran; mahdi@mail.yu.ac.ir Received 1 March 2010; revised 24 April 2010; accepted 13 May 2010. ABSTRACT To determination the volume and weight of non- uniform bodies, such as in ore deposits evalua- tion for mining and rock cutting for construction, the methods of interpolation are usually used. The classic curves, which are frequently used to interpolate one-dimensional data are cubic spl- ine, Bspline and Bezier curves. These methods have good efficiency for determination of geom- etric characteristics of nonregular masses. They have some limitations and problems with two- dimensional interpolation analysis such as for- ming large linear systems of equations with a lot of entries and difficulty encounter with their solutions. In this research the two-dimensional splines are used, which have the advantages of simplicity and less computational operations ef- fort. The spline functions that are applied have the continuity of C1 at elements boundaries. The presented model has suitable efficiency for vo- lumes of large extents governing to lots of data. Keywords: Simulation; Approximation; Least square; Cubic Spline; Optimization; Curve Fitting; Prediction 1. INTRODUCTION The most popular methods for interpolation of data are Lagrange method, Neville iteration approach, Newton divided difference methods, Cubic spline, Hermit spline, Bspline and Bezier methods. For the Neville and New- ton divided difference method, the higher degree of pol- ynomial generation is straightforward. In conic spline approach each curve consists of a number of about n segment curves. The general way is to divide the interval to collect subintervals or segments and construct differ- ent approximating polynomial on each interval. Appr- oximation by functions of this type is called piecewise polynomial approximation. This method has the advan- tage of removing the oscillatory nature of high degree polynomials. In this approach there exists the continuity of C2 on the segments boundaries. However; the conti- nuity order is optional to users willing. The formulation for creating cubic spline curve results in the solution of a three-diagonal system of equations. Hermit interpolation are based on two points p1 and p2 and two tangent values ' 1 p and ' 2 p at those points. It computes a curve seg- ment that starts at p1, going in direction to ' 1 p and ends at p2 moving toward ' 2 p. Hermit interpolation has an important advantage. The Hermit curve can be modified by changing the tangent values. The Bezier curve is a parametric curve p(t) that is a polynomial function of the parameter t. The degree of the polynomial depends on the number of points used to define the curve. The method applies control points and presents an approximating curve. The Bezier curve does not pass through internal points but the first and last points. Internal points influence the direction and posi- tion of the curve by pulling it toward themselves [1-3]. B-spline methods were first proposed in the 1940 for curves and surfaces. The B-spline curves can be ap- proximating or interpolating curves. The advantage of B-spline curves to Bezier curve is the obtaining the higher continuity for the individual spline segments [2-5]. If there are a set of triple data ),,,{( ' iii yyxc },,2,1,0ni The cubic spline functions Si(x) can be obtained on each interval [xi, x i+1]. With this model the continuity of C1 exists on the boundary of each segment. The spline function of degree 3 for each interval is: i i i i iiiii d c b a xxxxdxcxbaxg 3232 1)( (1) If the Eq.1 is written based on the first point of each segment (xi , xi+1) then, M. Zamani / Natural Science 2 (2010) 641-645 Copyright © 2010 SciRes. OPEN ACCESS 642 i i i i i ii iii iiiiiiii d c b a x xx xxx xxx xxdxxcxxbaxs 1000 3100 3210 1 1 )()()()( 2 2 32 32 32 (2) The first derivatives of the spline function (2) is as follows, i i i i ii iiiiii d c b x xx xx xxdxxcbxs 300 620 321 1 )(3)(2)( 2 2 2' (3) The coefficients iii cba ,, and i dfor each interval can be obtained explicitly from the Eq.5. )( 1 )( 2 )2( 1 )( 3 )( )( '' 1 2 1 3 '' 11 2 '' ii i ii i i ii i ii i i iii iii ff h ff h d ff h ff h c fxsb fxsa , (4) where hi is the element size or the element interval (hi = xi+1 – xi). The problem with this approach is that we generally don’t have the tangent values at n + 1 point. This can be provided by applying the following ap- proximation equations (forward difference, central dif- ference and backward difference approximation, respec- tively) for the first derivatives at the points and for uni- form intervals hi. ]3,4,1[ 2 1 ]1,0,1[ 2 1 ]1,4,3[ 2 1 ' ' ' i i i i i i h f h f h f , (5) The following two examples show the interpolation of two sets of data by the above approach. 2. EXAMPLES 2.1. Example 1 This example is in the field of groundwater engineering. When a production well in unconfined aquifer is pumped, water is continuously withdrawn from storage within the aquifer as the cone of depression progresses radially outward from the well. Because of the absence of a re- charge source in the form of vertical leakage, there can be no stabilization of water levels and the head (h) in the aquifer will continue to decline supposing the aquifer is infinite in areal extent. However, the rate of decline of head (h) continuously decreases as the cone of depres- sion spreads. The partial differential equation governing the unsteady-state radial flow in the nonleaky confined aquifer in polar coordinate system is, t h T S r h r r h 1 2 2 . (6) The Theis solution for the above partial differential equation is, du u e T Q hhs u u 4 0. (7) Theis approximated the above equation by the fol- lowing series, !33!22 log5772.0 4 32 0 uu uu T Q hh e (8) where, Tt Sr u 2 87.1 s = drawdown, in feet, Q = discharge, in gpm, t = time after pumping started, in days, T = coefficient of transmisivity, in gallons per day per foot (gpd/ft) and S = coefficient of storage, dimensionless. The value of brackets equals W(u). The data for in- terpolation have logarithm values of W(u) respect to u [6]. For the interpolation of data about ten points are considered. Figure 1 shows the comparison between the W(u) vs u W(u) u mo d el W(u) Figure 1. The comparison between the data and the model. M. Zamani / Natural Science 2 (2010) 641-645 Copyright © 2010 SciRes. OPEN ACCESS 643 643 data and the model for the nine spline curves. Based on the figure there is a suitable and good relationship be- tween those. 2.2. Example 2 In this problem about five pairs of data are obtained from the parametric Eq.9 with non-uniform segments. ]24,0[, 12 cos2sin2 12 sin 12 sin2sin2 12 cos t tty ttx . (9) About four cubic spline curves are generated accord- ing to the formulations of Eqs.3, 4 and 5. Figure 2 shows the relationship between the real values and in- terpolated ones. As it can be seen, there is a relative ex- pectable fitness between them. 3. FORMULATION FOR 2-D INTERPOLATION The bicubic spline formation that applies hear for two dimensional interpolation and four nodes patch is, 223 01 23456 223 789 (, ) ij g xyaax ay axaxy ayax axy axyay (10) or in matrix notation, 3 2 6 73 841 9520 32 1 000 00 0 1),( y y y a aa aaa aaaa xxxyAxyxgij . (11) If the above equation is written based on (i x,i y) or the coordinates of the lower left point on each segment, Eq.12 y x Figure 2. The comparison between the data and the model. obtains. Then, the formulation for determination of the coefficient will be simpler. 2 01 23 2 45 32 67 23 89 (,)( )()( ) ()()() ()()() ()()() ijij i ij j iij jj j s xya axxayyaxx axxy yay y ax xax xy y axxy yay y (12) or in matrix notation it is, 3 2 23 2 2 32 32 1 133 012 001 0001 1000 3100 3210 1 1),( y y y yyy yy y A x xx xxx xxxyxs iii ii i i ii iii ij . (13) The above bispline function has ten parameters (un- knowns) for each segment or patch. Therefore; ten equa- tions are required for defining them. Four equations sat- isfy the function values at each corner and six equations satisfying partial derivative in x and y directions for three nodes. Thus there exists the continuity of C1 on each of four sides or boundaries of every element. The first derivatives in x and y direction for the Eq.12 are: 22 6 73 841 2 2 1 12 01 001 00 0 100 310 321 321 ),( y y yy y a aa aaa x xx xx x yxs jj j i ii ij . (14) 22 7 84 952 2 2 3 2 1 133 012 001 00 0 100 210 1 1 ),( y y yy y a aa aaa x xx xx y yxs jj j i ii ij . (15) The coefficients 910 ,,, aaa can be derived explicitly from satisfying the following conditions, M. Zamani / Natural Science 2 (2010) 641-645 Copyright © 2010 SciRes. OPEN ACCESS 644 ' ,2 ' ,10 ),( , ),( ,),( ijy ij ijx ij ijij fa y jis fa x ji s fajis (16) ' ,1,6 2 31 32),1( jixii ij fahahaji x s , (17) ' 1,,9 2 52 32)1,( jiyjj ij fakakaji y s , (18) ' ,1,7 2 42 ),1( jiyii ij fahahaji y s , (19) ' 1,,8 2 41 )1,( jixjj ij fakakaji x s , (20) jiiii jiij fahahaha jisjis ,16 3 3 2 10 ,1 ),1(),1( , (21) 1,9 3 5 2 20 1,)1,()1,( jijjj jiij fakakaka ji s ji s , (22) 1,19 3 8 2 7 2 6 3 5 2 43 3 2 101,1 )1,1()1,1( jijji jiijjiij ijiij fakakh akhahakakhahak ahaji s ji s (23) The above ten equations give a linear system of equa- tions. If it is solved analytically the governing parame- ters are obtained as follows, , 1323' 1,,1 2 10 2 3jix i ji i i i f h f h a h a h a (24) ' 1,1,11,,1 2104 1 )( 1 111 jix j jijiji ji ijji f k fff kh a h a k a kh a , (25) , 1323 ' 1,1, 2 20 2 5 ijy j ji j j j f k f k a k a k a (26) , 1212 ' 1, 2 ,1 3 1 2 0 3 6jix i ji iii f h f h a h a h a (27) ' 1,1,11,,1 2 10 2 7 1 )( 111 ijx ji jijiji ji ji ji f kh fff kh a kh a kh a , (28) ' 1,1,11, ,1 2 20 2 8 1 ) ( 111 jiy ji jiji ji ji ji ji f kh ff f kh a kh a kh a , (29) ' 1, 2 1, 3 2 2 0 3 9 1212 ijy j ji jjj f k f k a k a k a (30) where jjjiii yykxxh 11 ,, ),1(,)1,( ' 1, ' 1, ji y f fji x f fjiyijx . (31) 4. PROBLEM 3 For testing the above formulation several problems were considered. Here only one of them is presented. The data for this problem are obtained from the Eq.32. ]3,0[]6,0[,,4),( )5.00867.0(22 yxeyxz yx (32) The domain of problem consists of 9 elements and 16 nodes. The elements are uniform where 2 i h and 1 i k. The above formulations were applied to to the governing data. Figure 3 shows the interpolation curves along x = 0, x = 2, y = 0 and y = 2. As it can be seen the 2-D model presents a close relationship to the relating set of data. 5. THE RESULTS AND CONCLUSIONS In this research two models for 1-D and 2-D interpola- tions were presented. The models are easy and straight- forward to handle. Therefore; it can be applied for prob- lems having huge data. It has the advantage of less computational efforts respect to the cubic spline, Bezier and B-spline methods especially for 2-D problems. The continuity for each segment is C1 therefore; this is suffi- cient for many problems such as calculation of surfaces and volumes of nonuniform bodies. It is recommended to compare the 2-D model with Bezier and B-spine methods respect to the fitness and accuracy. comparison x , y 0 1 2 3 4 5 6 4.5 4 3.5 3 2.5 2 1.5 1 0.5 0 f (x, y) f(x, y) model f(x, 0) f(x, 2) f(2, y)f(02, y) Figure 3. The comparison between the data and 2-D model. M. Zamani / Natural Science 2 (2010) 641-645 Copyright © 2010 SciRes. OPEN ACCESS 645 645 REFERENCES [1] Salmon, D. (2006) Curves and surfaces for computer graphics. Springer, New York. [2] Saxena, A. and Sahay, B. (2005) Computer aided engi- neering design. Springer, Anamaya Publisher, New Delhi. [3] Conte, S.D. and de Boor, C. (1981) Elementary numeri- cal analysis, an algorithm approach. Kin Keong Printing Co. Pte. Ltd., Singapore. [4] Burden, R. and Fairs, D. (1989) Numerical analysis. PWS-Kent Publishing Company, Boston. [5] March, D. (2005) Applied geometry for compute graph- ics and CAD. 2nd Edition, Springer-Verlag, New York. [6] Todd, D.K. (1959) Groundwater hydrology. John Wily & Sons, Inc., New York. |