an applied two dimensional b-spline model for interpolation of data
TRANSCRIPT
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
322
AN APPLIED TWO-DIMENSIONAL B-SPLINE MODEL FOR
INTERPOLATION OF DATA
Mehdi Zamani
Civil Engineering Department, Faculty of Technology and Engineering, Yasouj University,
Yasouj, IRAN, [email protected]
ABSTRACT
The literature about the interpolation of data is less than the one's for the
approximation of data especially for three dimension data. The three methods of
interpolation, two-dimensional Lagrange, two-dimensional cubic spline and two-dimensional
explicit cubic spline are investigated. In the present study a new model with two-dimensional
B-spline approach has been developed. The presented model has the advantage of simplicity
and applicability with respect to the volume of operation calculations and using non-uniform
and non-symmetric data. Three problems were selected for the testing and verifying the
model with the square arrangement of the data and its non-uniform distribution. The results
indicate that this model is simple, efficient and applicable for the two-dimensional
interpolation of data. The model can be generalized for non-regular and non-uniform
distribution of data, which can result in a bounded sparse matrix for the governing linear
system of equations.
Keywords: approximation, B-spline, cubic spline, interpolation, Lagrange method
I. INTRODUCTION
The interpolation models are applied considerably in all branches of engineering
activities. Examples are the evaluation of surface area and volume of non-uniform and
irregular objects, determination of volumes of cutting, filling and embankment in earth work,
and engineering surveying. Volume of surface topography and morphology forms such as
hills and valleys. Here interpolation means to find a model function such as )(xp which
satisfies n data points fi therefore; ii fxp =)( for ni ,,3,2,1 L= . In approximation approach, the
model curve does not necessarily cross the data points. The classic methods of interpolation
are explained in details by (Fomel, 1997b), (Collins, 2003), (Dubin, 2003), (Kiusalaas, 2005),
(Nocedal and Wright, 2006) and (Zamani, 2009a). The methods for two-dimensional
INTERNATIONAL JOURNAL OF ADVANCED RESEARCH IN
ENGINEERING AND TECHNOLOGY (IJARET)
ISSN 0976 - 6480 (Print) ISSN 0976 - 6499 (Online) Volume 3, Issue 2, July-December (2012), pp. 322-336 © IAEME: www.iaeme.com/ijaret.asp Journal Impact Factor (2012): 2.7078 (Calculated by GISI) www.jifactor.com
IJARET
© I A E M E
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
323
943
73432313
7421
2
72423212
74311
71413121
7432
)()())()()((
))()()((
))()()((
))()()((
))()()((
))()()((),(
zzzyyyyxxxx
yyyyxxxx
zyyyyxxxx
yyyyxxxxz
yyyyxxxx
yyyyxxxxyxz
+++−−−−
−−−−
+−−−−
−−−−+
−−−−
−−−−=
L
x
y
interpolation in engineering literature are not frequent. The most important models in this
area are Lagrange method, B-spline method, two-dimensional cubic spline method, and
explicit two-dimensional cubic spline method. The introduction of the paper should explain
the nature of the problem, previous work, purpose, and the contribution of the paper. The
contents of each section may be provided to understand easily about the paper.
1.1 Lagrange Method The Lagrange method for this case is the generation of one-dimensional Lagrange
formulation for two-dimensional interpolation problems (Dierckx, 1993) and (Burden and
Fairs, 2010). For a problem with a set of 9 triple data A ε {(xi, yi, zi) i=1,2,…,9)} Figure 1.
The two-dimensional Lagrange equation is as follows,
(1)
Fig: 1 Simple data distribution
The two-dimensional Lagrange model is limited in terms of applicability. The degree and
order of the Lagrange polynomial increases as the number of data point increases. Therefore,
it results in the oscillation and sinus behavior of the governing curve. Hence, the Lagrange
curves give high inclination and deviations from the real curves for the points between the
data or nodes. Therefore, the model is not applicable and efficient for huge engineering data.
1.2 B-spline Approximation Method B-spline methods have been extended since 1970s. The designated B stands for Basis,
so the full name of this approach is the basic spline. B-spline methods are mostly used for
curves and surfaces in computer graphics. The 2nd
and 3rd
degree B-splines which are used
extensively for approximation of data are less applicable for the interpolation of data. With
some modifications and corrections the B-spline models specially the second and third
degrees can be applied for interpolation of huge data, particularly for one-dimensional
interpolation problems. The 2nd
and 3rd
degrees B-spline polynomials can be used for
approximation of n control points )1,,2,1,0,( −= nipi L (Saxena and Sahay, 2005) and (Salomon,
2006) as,
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
324
2,,2,1
011
022
121
2
11)(
1
1
2 −=
−
−
=
+
−
ni
p
p
p
tttP
i
i
i
i L
[ ]{ } 3,,2,1
0141
0303
0363
1331
6
11)(
2
1
1
23 −==
−
−
−−
=
+
+
−
nipBt
p
p
p
p
ttttP
i
i
i
i
i L
]4[6
1
]4[6
1
212
111
++
+−
++=
++=
iii
iii
pppq
pppq
[ ][ ][ ] { }
−
−
−−
−
−
−−
==
++++++−
++++++−
++−
−+−+−−−
10001
1333
4063
1331
6
1
0141
0303
0363
1331
6
11
),(
2
3
2,22,12,2,1
1,21,11,1,1
,2,1,,1
1,21,11,1,1
23
,
u
u
u
zzzz
zzzz
zzzz
zzzz
ttt
uBzBtutp
jijijiji
jijijiji
jijijiji
jijijiji
T
jii
[ ][ ][ ][ ] [ ] { }yABZBAxyxpTT
i '),( =
12
1
12
12
1
12
22
2
2
',1
'
,,1
,
100
''0
'''2'
',
1
02
00
yy
yb
yya
xx
xb
xxaba
bbaa
A
bb
aab
a
AT
−−=
−=
−−=
−=
=
=
(2)
(3)
The above B-spline curves will not cross through the control points but pass near them. The initial
and terminal points (q1 and q2) of the cubic B-spline curve which are joint points can be obtained
from Eq. (4).
(4)
The two-dimensional cubic B-spline can be obtained from the product of Eq. (3) in two dimensions
as,
[ ]{ } [ ]{ }[ ]Tjii pBupBtutp =),(
(5)
(6)
Where [ ]1,0, ∈ut . Using the linear transformation from t and u to x and y; respectively for the
uniform B-spline surface patch in Fig. (2), the graph equation ),( yxpiresults as follows,
(7)
where 12xxx = , 12
yyy = and
(8)
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
325
x
y
[ ])4()4(4)4(36
11,11,1,1,1,,11,11,1,1 ++++−+−−+−−− ++++++++= jijijijijijijijijiij zzzzzzzzzq
3333
322322
3322
22
)()()()(
)()()()()()(
))(()()())(()()(
)())(()()()(),(
jijiijjiij
jiijjiijjiij
jiijjiijjiijjiij
jijjiijiijjijiijijij
yypxxoyyxxn
yyxxmyyxxlyyxxk
yyxxjyyxxiyyxxhyyxxg
yyfyyxxexxdyycxxbayxs
−+−+−−+
−−+−−+−−+
−−+−−+−−+−−+
−+−−+−+−+−+=
Fig: 2 Data distribution for B-spline surface patch
A network of data with (m+1)×(n+1) control points P00 through Pmn has (m+1) rows and
(n+1) columns with uniform x and y increments ),( yx ∆∆ . From the above network about (m-
2)×(n-2) local cubic B-spline graphs or patches can be obtained which have continuity at least
c1 on each element side. The final graph which consists of local graphs passes (m-1)×(n-1)
internal points ijq . If the data points transfer to those internal joint points
ijq the final graph
would be a two-dimensional cubic B-spline which is obtained by the interpolation method.
Hence, the final graph crosses all the data points. For the details of this method, the situation
of internal joint points, and their coordinates refer to (Salomon, 2006). The ijq can be
determined with respect to z value as Eq. (8).
(8)
The interpolation by two-dimensional cubic B-spline of a network data with mesh m×n and
uniform x∆ and y∆ requires 2(m+n+2) more equations in order to satisfy the uniqueness of
the governing system of equations. However, it relates to the degree of polynomial B-spline
considered. The above extra equations should be obtained by satisfying the boundary
conditions. The governed linear system of equations is a kind of nonadigonal system. It is
clear that this model is not practical for problems having huge data points.
1.3 Two-dimensional Cubic Spline Method This method is obtained by the product of two cubic spline equations in directions x and y as
Eq. (9).
(9)
Where ijs is bicubic spline which defines for each rectangular element and has 16 parameters.
Those parameters are obtained by satisfying the following 16 continuity equations on the
corners of each element.
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
326
3),(3),(
3),(3),(
3),(1),(
2
2
2
2
1,111
⇒∂
∂⇒
∂
∂
⇒∂
∂⇒
∂
∂
⇒=⇒= ++±±
ji
ij
ji
ij
ji
ij
ji
ij
jijiijijjiij
yxy
syx
y
s
yxx
syx
x
s
fyxsfyxs
3
9
2
8
2
7
3
6
2
2
54
2
3210
)(
))(()()()()()(
)())(()()()(),(
j
jijiijiij
jjiijiij
yya
yyxxayyxxaxxayyxxg
yyayyxxaxxayyaxxaayxs
−+
−−+−−+−+−−+
−+−−+−+−+−+=
=
=
=
=
++++
++
++
1,111
1,1
,11
),(
),(
),(
),(
jijiij
jijiij
jijiij
ijjiij
fyxs
fyxs
fyxs
fyxs
=∂
+∂
=∂
+∂
=∂
+∂
=∂
+∂
=∂
∂
=∂
∂
+
+
+
+'
1,,
'
,1,
'
,1,
'
1,,
'
,,
'
,,
)1,(
),1(
),1(
)1,(
),(
),(
jiy
ij
jiy
ij
jix
ij
jix
ij
jiy
ij
jix
ij
fy
jis
fy
jis
fx
jis
fx
jis
fy
jis
fx
jis
(10)
The above 16 equations of continuity for each element are written and combined together to
form a nonadiagonal linear system of equations. By adding the governing boundary
conditions to the above linear system it is complemented to a linear system of equations
which has a unique solution. This method of solution gives the c2 continuity along each node
and at least c1 continuity at the element sides.
1.4 Explicit Two-dimensional Cubic Spline Method An explicit two-dimensional interpolation model has been developed by (Zamani, 2010) that
is the simplification of the above two-dimensional cubic spline method. He applied uniform
network of data set (rectangular distribution). The interpolation equation which is
implemented in his model is as follows,
(11)
The coefficients 0a to
9a are obtained by using c1 continuity on each element sides. They
consist of 4 equations of continuity for function and 6 equations of continuity for the first
partial derivatives along the x and y axis at 4 nodes of each element, Eqs. (12) and (13).
(12)
(13)
With having the above partial derivatives the problem is unique and it consists of 10
equations and 10 unknowns which can be solved explicitly (it’s not necessary to form any
linear system of equations). In most cases the partial derivatives are not available at each
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
327
,,, '
,2
'
,10 ijyijxij fafafa ===
'
,1,,121023
1323jix
i
ji
iii
fh
fh
ah
ah
a ++ −+−−=
'
1,,2
'
,1,1,11,,1104
111)(
111++++++ +−+−++−−= jix
ji
jiy
i
jijiji
jijji
fk
ah
fh
fffkh
ak
akh
a
'
1,,1,22025
1323++ −+−−= jiy
j
ji
jjj
fk
fk
ak
ak
a
'
,1,2,1312036
1212jix
i
ji
iii
fh
fh
ah
ah
a ++ +−+=
'
1,,1,11,,121027
1)(
111+++++ −−+−+= jix
ji
jijiji
jijiji
fkh
fffkh
akh
akh
a
'
,1,1,11,,122028
1)(
111jiy
ji
jijiji
jijiji
fkh
fffkh
akh
akh
a +++++ −−+−+=
'
1,,21,322039
1212++ +−+= jiy
j
ji
jjj
fk
fk
ak
ak
a
[ ] )()()()()( 1100
1
ucucucxucxs nnii
n
i
i ββββ +++==∑=
L
node but can be removed or eliminated by using numerical derivatives approaches. The
coefficients 0a to
9a of Eq. (11) can be determined from the following equations.
(14)
Where ih and
ik are length and width of element ij ; respectively. For a huge set of data
which usually exists in engineering problems the above model is simple and requires less
calculation operations with respect to the other methods of two-dimensional interpolation.
The only limitation for this model is determining the partial derivatives with respect to x and
y axis at each node and they should be approximated by the governing methods.
II. MODEL FORMULATION
The model is the generation of B-spline method in two dimensional, therefore; it is
better to explain a brief review of the one-dimensional B-spline.
2.1 One-dimensional B-spline
This model is explained in more detail by (Salamon, 2006) but in this study it is briefly
discussed. The B-spline curve consists of a series of B-spline basic functions that are linearly
independent in domain [a, b] as,
(15)
where ]2,2[−∈u , hxxxu ii /)()( −= , nabh /)( −= and n is the number of elements. Each B-
spline basic function consists of four cubic polynomial functions as Eqs. (16).
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July
u
uu
uu
u
ui
0
)2(
1(3)1(3)1(31
1(3)1(3)1(31
)2(
)(
3
2
2
3
−
−−−+−+
+−++++
+
=β
aecaeu h
xxb
ub
i
i
−=−=
−−
−
2
2
)(β
)()(4)( 110011 xcxcxc =++−− βββ
)()(4)( 0
'
110
'
000
'
11 xcxcxc ++−− βββ
The following basic equation is applied for B
applicability and continuity order (Zamani, 2009b).
Where 016478.4=a , 3740615.1=b
function for Eq. (17).
Fig: 3
In order to promote the accuracy and efficiency of B
)(11 uc −− β and )(11 uc nn ++ β are added to Eq. (15) for adding the effects of boundary conditions.
The coefficients 1−c and 1+nc can be calculated with respect to the B
points according to the following equations.
After making derivatives from the B
(19) it can be written as,
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
328
otherwise
u
u
u
u
u
u
,
21,
10,
01,
12,
)
)3
3
≤≤
≤≤
≤≤−
−≤≤−
−
+
c
)(xf
)() 0
'xf=
The following basic equation is applied for B-spline basic function for increasing its
applicability and continuity order (Zamani, 2009b).
3740615 and 016478.0=c . Fig. (3) shows the B
Fig: 3 B-spline basic function
In order to promote the accuracy and efficiency of B-spline method two basic functions
are added to Eq. (15) for adding the effects of boundary conditions.
can be calculated with respect to the B-spline curve at boundary
points according to the following equations.
After making derivatives from the B-spline basic functions )(1 x−β , )(0 xβ and
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
December (2012), © IAEME
(16)
spline basic function for increasing its
(17)
. Fig. (3) shows the B-spline basic
spline method two basic functions
are added to Eq. (15) for adding the effects of boundary conditions.
spline curve at boundary
(18)
(19)
and )(1 xβ in Eq.
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
329
'
00
'
11 )( fxfcc ==+− − αα
ab
ehfc
fcc
b
2
'
01
'
011 −=−=−
α
ab
ehfc
fcc
b
nn
nnn
2
'
1
'
11 +=+= −−+α
ceayx hb
k −=−
22
2
),( l
ρ
β
[ ]ceayx
ji yyxxh
b
k −=−+−− 22
22)()(
),( lβ
[ ]ceayx
ji yyxxh
b
ij −=−+−− 22
2)()(
2
),(β
(20)
(21)
where h
abe
h−
=2
α . In the same way the coefficient 1+nc for the last boundary point can be
obtained.
(22)
With regarding to '
0f and '
nf the derivatives at the first and the last points are not available
and should be approximated. This model gives a tridiagonal linear system of equations with
dimensions (n+1)×(n+1) with 4 on the main diagonal entries and 1 on the sub diagonal and
sup diagonal components. The obtained linear system of equations is easy to solve. This can
be done by Thomas algorithm. The above model results in smooth curves for data of having
nonlinear distributions and uniform elements. The model can also be extended for data of
non-uniform element length.
2.2 Two-dimensional B-spline The two-dimensional B-spline model is the generation of one-dimensional model in two
directions and in cylindrical coordinates is as follows,
(23)
(24)
where k is number of node having (xi, yi) coordinates. Eq. (24) for 2/2=l is,
(25)
Where h is element length. The two-dimensional B-spline Eq. (25) for h=1 and 2=ρ ,
2/2 and 0 equal 0, 1 and 4; respectively. The effective radius for B-spline function of Eq.
(25) is 2 . Figs. (4) and (5) show the graph of Eq. (25) and its contour line.
Fig: 4 Two-dimensional B-spline basic function graph
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July
m
n
m
m ccyxcyxs ββ +==∑=
11
1
),(),(
mkmkmmmmm ccfyxs −−− +== ββ 1,),(
=
===== ++−−
4
11
m
kmmmkm a
β
αββββ
c
c
c
c
4
4
4
40
40
40
4
00004
OOOOO
O
OO
OO
OO
OOOO
O
αα
ααα
ααα
αα
αα
ααα
ααα
αα
Fig: 5 Two-dimensional BSuppose there exist n data points with uniform rectangular or square mesh. The element dimensions
are constant all over the mesh with length
dimension B-spline function for this set of data can be written as,
where n is the total number nodes and m is the node number. For simplification of the
let’s consider square elements with h
The values of B-spline basic functions from Eq. (27) equal,
If Eq. (27) is applied on each node the following linear system of equations Eq. (29) will be
obtained where it is pentadiagonal system with 4 on the main diagonal entries and
diagonal components. Since the values of diagonal entries are constant,
to save the values of 4, α and their addresses to save matrix A. This saves computer memory
especially for problems with huge number of data.
Three problems are chosen for investigation of checking and efficiency of the a
which are explained here.
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
330
nnccc βββ L++ 3333
kmkmmmmmm ccc ++++− +++ ββββ 111
−2bea
[ ]{ } { }fcA
f
f
f
f
c
c
c
c
n
n
n
n
==
=
−− 1
2
1
1
2
1
M
M
M
M
dimensional B-spline basic function contour Suppose there exist n data points with uniform rectangular or square mesh. The element dimensions
are constant all over the mesh with length iii xxhh −== +1 and
jj yykk −== +1
spline function for this set of data can be written as,
where n is the total number nodes and m is the node number. For simplification of the
1== kh . The B-spline function ),( yxs for node m is,
functions from Eq. (27) equal,
If Eq. (27) is applied on each node the following linear system of equations Eq. (29) will be
obtained where it is pentadiagonal system with 4 on the main diagonal entries and α on the four others
diagonal components. Since the values of diagonal entries are constant, therefore; it is only necessary
and their addresses to save matrix A. This saves computer memory
especially for problems with huge number of data.
Three problems are chosen for investigation of checking and efficiency of the above formulation
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
December (2012), © IAEME
Suppose there exist n data points with uniform rectangular or square mesh. The element dimensions
jy . The two-
(26)
where n is the total number nodes and m is the node number. For simplification of the formulation
for node m is,
(27)
(28)
If Eq. (27) is applied on each node the following linear system of equations Eq. (29) will be
(29)
on the four others
therefore; it is only necessary
and their addresses to save matrix A. This saves computer memory
bove formulation
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
331
[ ] 5.0)2(13.1)1(71.0 22
),( −+−== yxeyxfz
),(),(),(20
1
25
1
yxcyxcyxs ib
i
ibi
i
i ββ ∑∑==
+=
xxxxxx
xxxxxx
yyyyyy
yyyyyy
i
ibib
ccc
ccc
ccc
cccyxc
25256655
21212211
252522222121
552211
20
1
),(
βββ
βββ
βββ
ββββ
+++
++++
++++
++++=
−−−−−−
−−−−−−=
∑
L
L
L
L
2.2.1 Problem 1
There are 25 data points { }25,,2,1;,, L=izyx iii in this problem. They form a mesh point with
5 rows and 5 columns and square elements as Fig. (6). The element side is 1== kh . The
domain of function ),( yxf is ]4,0[∈x , ]4,0[∈y . The data are obtained from Eq. (30).
(30)
As indicated in Fig. (6) 20 auxiliary points or nodes around the data are considered for
including the effects of boundary conditions. This action causes an increase in accuracy and
efficiency of presented model for solving these kinds of problems.
Fig: 6 Data distribution in problem 1
Partial derivatives are required with respect to x axis and y axis at boundary nodes for this
purpose. For the most engineering data the above partial derivatives for boundary points are
not available and should be somehow approximated. The B-spline model which is used for
this problem is,
(31)
In Eq. (31) the second set of equation is related to the effects of boundary conditions which
can be expanded as Eq. (32).
(32)
For calculation ),( yxs or z value for internal points in each element it is necessary to consider
only a few terms of Eq. (31). Most of its terms are zero for each point inside the elements
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
332
because of the nature of B-spline basic function. Fig. (7) shows the amount of the
effectiveness with regard to the number of B-spline basic functions which contributes to
determining ),( yxs . For example in elements with nodes 8, 9, 13, and 14 the number of
required B-spline basic functions for calculation ),( yxs are from minimum 4 to maximum 7
Fig. (7). This problem is solved by the presented model. Figs. (8), (8a), (9) and (9a) show
the comparative behavior between the model and the real values of ),( yxf function for the
central points of elements. As it can be seen from the figures there are a suitable relationship
and agreements between the model output and the real data.
Fig: 7 Required number of B-spline basic function
Fig: 8 Graph of real data Fig: 8a Contour lines of real data
0 0. 1 1. 2
0 1 2 3 4
x
0
1
2
3
4
y
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July
817.610[),( 5.2(2.1)5.4( 2
+= −−−− eeyxf xx
Fig: 9 Graph of B-spline model Fig: 9a Contour lines of B
2.2.2 Problem 2 This problem in relation to the previous one has more complexity with respect to the
variations of data. In this example there are 121 data points
form a uniform mesh having 11 rows and 11 columns with the domain of
]6,1[∈x , ]6,1[∈y . The data are generated by the following equation.
About 44 auxiliary boundary nodes for
considered. The partial derivatives with respect to x and y axis at boundary points are
calculated by the forward and backward divided difference formulas. The graph and contour
lines for Eq. (33) are in Figs. (10) and (10a). They are shown from the B
Figs. (11) and (11a) as well. Comparison of the figures shows a good agreement and suitable
relationship between the real data and the interpolated data.
Fig: 10 Graph of real data
0 1 2 3
x
0
1
2
3
4
y
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
333
8
)4(] 53.2)5 2 π−yCos
spline model Fig: 9a Contour lines of B-spline model
This problem in relation to the previous one has more complexity with respect to the
variations of data. In this example there are 121 data points{ 121,,2,1;,, L=izyx iii
form a uniform mesh having 11 rows and 11 columns with the domain of function
. The data are generated by the following equation.
About 44 auxiliary boundary nodes for applying the effects of boundary conditions are
considered. The partial derivatives with respect to x and y axis at boundary points are
calculated by the forward and backward divided difference formulas. The graph and contour
s. (10) and (10a). They are shown from the B-spline model in
Figs. (11) and (11a) as well. Comparison of the figures shows a good agreement and suitable
relationship between the real data and the interpolated data.
Fig: 10 Graph of real data Fig: 10a Contour lines of real data
4
middle points f(x,y)
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
December (2012), © IAEME
spline model
This problem in relation to the previous one has more complexity with respect to the
}121 . The data
function ),( yxf
(33)
applying the effects of boundary conditions are
considered. The partial derivatives with respect to x and y axis at boundary points are
calculated by the forward and backward divided difference formulas. The graph and contour
spline model in
Figs. (11) and (11a) as well. Comparison of the figures shows a good agreement and suitable
Fig: 10a Contour lines of real data
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July
[ ])/(8)( 22yxArctgSinyxz +=
Fig: 11 Graph of B-spline model Fig: 11a Contour lines of B
2.2.3 Problem 3
This example consists of 49 triple data points
they form a uniform square mesh with 7 rows and
element size 0.1== kh . The data which are highly nonlinear are obtained from Eq. (34).
About 28 auxiliary points are considered for including the effects of boundary conditions.
Fig: 12 Network of data and boundary points
The domain of data for this problem is
the partial derivatives with respect to x axis and y axis at the boundary points are calculated
by the numerical method differentiation. The parameters governing to the boundary points
can be obtained from the above deri
determined from Eqs. (35) and (36).
43y
-43x 43
-36 36
-29 29
-22 22
-15 15
-8 8
-1x 1
-1y
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
334
spline model Fig: 11a Contour lines of B-spline model
triple data points{ }49,,2,1;,, L=izyx iii. According to Fig. (12),
form a uniform square mesh with 7 rows and 7 columns of data and 36 elements with
. The data which are highly nonlinear are obtained from Eq. (34).
About 28 auxiliary points are considered for including the effects of boundary conditions.
Fig: 12 Network of data and boundary points
The domain of data for this problem is ]7,1[∈x , ]7,1[∈y . Similar to the previous problem
the partial derivatives with respect to x axis and y axis at the boundary points are calculated
by the numerical method differentiation. The parameters governing to the boundary points
can be obtained from the above derivatives. The parameters xc7and
yc 7−for example can be
determined from Eqs. (35) and (36).
43y +44 +45 +46 +47 +48 +49y
43 44 45 46 47 48 49 +49x
36 37 38 39 40 41 42 +42
29 30 31 32 33 34 35 +35
22 23 24 25 26 27 28 +28
15 16 17 18 19 20 21 +21
9 10 11 12 13 14 +14
2 3 4 5 6 7 +7y
1y -2 -3 -4 -5 -6 -7y
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
December (2012), © IAEME
spline model
. According to Fig. (12),
7 columns of data and 36 elements with
. The data which are highly nonlinear are obtained from Eq. (34).
(34)
About 28 auxiliary points are considered for including the effects of boundary conditions.
. Similar to the previous problem
the partial derivatives with respect to x axis and y axis at the boundary points are calculated
by the numerical method differentiation. The parameters governing to the boundary points
for example can be
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
335
)7(1 '
67 xx fA
cc +=
)7(1 '
147 yy fA
cc −=−
[ ]ceayx ji yyxxb
k −=−+−− 22 )()(2
),(β
(35)
(36)
where babeA −= 8 . The two dimensional B-spline basic function which is applied for this problem
for 0.1=h and 2/2=l is,
(37)
The graphs and contour lines obtained by the model and from the function ),( yxf are in Figs. (13),
(13a), (14) and (14a). A comparison between these figures presents a good and suitable relationship
for real data and the two-dimensional B-spline model.
Fig: 13 Graph of real data Fig: 13a. Contour lines of real data
Fig: 14 Graph of B-spline model Fig: 14a Contour lines of B-spline model
1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5
x
1.5
2
2.5
3
3.5
4
4.5
5
5.5
6
6.5
y
f(x,y)
f(x,y)
1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5
x
1.5
2
2.5
3
3.5
4
4.5
5
5.5
6
6.5
y
B-spline model B-spline model
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 –
6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 2, July-December (2012), © IAEME
336
III. CONCLUSIONS AND DISCUSSION
The interpolation methods especially the two-dimensional ones have many
applications in all branches of engineering science. Therefore; the development, extension
and improvement of these methods are necessary. The presented model is easy to implement
and results in a linear pentadiagonal systems of equations which is diagonally dominant and
simply solvable. The presented model for interpolation of data with rectangular and square
elements is powerful. Also it can be expanded for non-uniform mesh or triangular elements
of data. The final linear system of equations for those cases is sparse and bounded while
about more than 90% of matrix entries are zero. The graphs obtained by this method have no
limitations of continuity properties inside and across the elements because of the continuity
conditions of the applied B-spline basic function. These conditions explain the advantage
and robustness of the presented model to the available methods of two-dimensional
interpolation.
REFERENCES
Burden, R. and Fairs, J. (2010). Numerical Analysis, 9
th Ed. Brooks-Cole Pub.
Comp.Boston.
Collins, G. W. (2003). II Fundamental Numerical Methods and Data Analysis, (internet pdf
file).
Dierckx, P. (1993.) Curve and Surface Fitting with splines, Clarendon Press, NY.
Dubin, D. (2003). Numerical and Analytical Methods for Scientists and Engineers Using
Mathematica, John Wiley & Sons, Inc., Pub., Hokoben, New Jersy.
Fomel, S. (1997b). On the General Theory of Data Interpolation, SEP. 94, 165-179.
Kiusalaas, J. (2005). Numerical Methods In Engineering with MATLAB, Cambridge Univ.
Press,UK.
Lobo, N. (1995). Curve fitting using spline sections of different orders, Proceedings of the
First International Mathematics Symposium, P. 267-274.
Nocedal, J. and Wright, S. J. (2006). Numerical Optimization, 2nd
Ed., Springer, Science
+Business Media, LLC, USA.
Salomon, D. (2006). Curves and Surfaces for computer Graphics, Springer Science
+Business Media, Inc. USA.
Saxena, A. and Sahay B. (2005). Computer Aided Engineering Design, Springer, Anamaya
Publishers, New Delhi, India.
Zamani, M. (2009 a). Three simple spline methods for approximation and interpolation of
data, Contemporary Engineering Science, Vol.2, No.8, P. 373-381.
Zamani, M. (2009 b). An investigation of B-spline and Bezier methods for interpolation of
data, Contemporary Engineering Science, Vol.2, No.8, P. 361-371.
Zamani, M. (2010). A simple 2-D interpolation model for analysis of nonlinear data, Natural
Science, Vol. 2, No. 6, June 2010, P. 641-646.
M. Nagaraju Naik and P. Rajesh Kumar, “Spectral Approach To Image Projection With
Cubic B-Spline Interpolation” International journal of Electronics and Communication
Engineering &Technology (IJECET), Volume3, Issue3, 2012, pp. 153 - 161, Published by
IAEME