Page 1

On Double Interpolation in Polar Coordinates

Codruţa Vancea, Florin Vancea and Antoniu Nicula

* Department of Electrical Engineering, Electrical Measurements and Electric Power Use,

University of Oradea, Faculty of Electrical Engineering and Information Technology,

1 Universităţii street, 410087 Oradea, Romania,

Phone: 0040-259-408769

E-Mail: cvancea@uoradea.ro

E-Mail: fvancea@uoradea.ro

E-Mail: niculaantoniu@uoradea.ro

Abstract – Interpolation is an important tool in

numerical modeling of real-life systems. The Lagrange

interpolation is frequently used, due to particular

advantages in implementation. The bi-dimensional

version may be implemented with Cartesian or with

polar coordinate system. Choice of the coordinate

system is important in order to obtain accurate results.

The polar case has particular properties that can be

exploited to minimize some of the common

disadvantages of polynomial interpolation.

Keywords: Lagrange, interpolation, polar coordinates.

I. INTRODUCTION

The attention given to function interpolation is due to

many situations when we know the values of a function

over a set of points and we need to evaluate the function

for other values in the domain. The main concern is to

find functions than offer good approximations and the

most appropriate are interpolation polynomials. For an

interpolation polynomial it is important to know its

expression, its accuracy and the graphical representation

of the curve that approximates the tabulated function. By

integrating the interpolation one derives the numerical

integration schemes and by deriving the interpolation

polynomials one builds finite differences

approximations that are the base of finite differences

method.

The study presented in the paper is about double

Lagrange interpolation, the Lagrange polynomial being

one of the most general interpolation polynomials.

Unlike the power series interpolation, where one

should solve a linear system of equations, the Lagrange

interpolation has the advantage of a more efficient

calculus.

What should be specified when we talk about the

interpolation accuracy is that on one hand the domain

chosen should be as small as possible and the number of

known points should be as high as possible.

The domain should be chosen as small as possible

because on shout intervals the function y=f(x) can be

approximated very well with algebrical polynomial

curves.

The errors arising from interpolation can be reduced

by increasing the number of given points, but with

caution. The reason is that if the known values are

tainted by errors or uncertainty then the polynomial

interpolation error becomes significant and is rising with

number of data points. In other words, the interpolation

accuracy is rising with the number of known points, but

only within a certain range [4].

In order to obtain a more precise approximation we

will have to impose certain conditions over the

interesting domain. It is important to choose correctly

the coordinate system. We should use a cartesian

coordinate system for rectangular domains and a polar

coordinate system for circular domains.

We have to mention that the interpolation over a bi-

dimensional domain can be performed in several ways.

Among others: bi-linear interpolation, double Lagrange

interpolation and transfinite interpolation

The transfinite interpolation is an interpolation

method for a bi-dimensional space where the

functional’s values over the exterior frontier and along

the interior grid lines are known.

The double Lagrange interpolation or bi-dimensional

Lagrange interpolation is applicable when the values of

the functional are known only at the intersection of the

grid lines, unlike the transfinite interpolation that “fits”

the continuous functions along the horizontal and

vertical lines [4].

II. BI-DIMENSIONAL LAGRANGE INTERPOLATION IN

CARTESIAN COORDINATES

The Lagrange interpolation can be used to fit a

polynomial curve to a set of known data points. For the

single-dimensional case with n+1 data points we know a

set of yi=f(xi) values for a set of xi points and according

to well-known formula we can obtain a set of n+1

Lagrange polynomials:

∏

=

j

, 0

≠

−

−

=

n

ij

ji

j

i

xx

xx

xL

)(

70

Page 2

Those polynomials have the property that for all x in

the set [x0, x2,…, xn] their value is 0, except for x=xi,

where the value is 1. Following that, an interpolation

polynomial can be built as [1]:

∑

=

i

0

The interpolation method is working even for non

evenly-spaced divisions over x.

One interesting side-note is that this polynomial is

offering good interpolation around the middle of the

interval and a worse one (or even a very poor one) near

the ends of the interval.

The principle can be extended to interpolate bi-

dimensional functions over a system of Cartesian

coordinates. In this case we have a set of n x m known

values f(x,y) over a grid defined by x ∈ [x0, x2,…, xn] and

y ∈ [y0, y2,…, ym].

The basic idea for extending the single-dimensional

case to the bi-dimensional case is to build interpolation

polynomials over x for all fixed yj then use those

polynomials to interpolate over y:

∑

=

i

0

∑

=

j

0

We will have therefore the base Lagrange

interpolation polynomials in bi-dimensional case [1]:

x

xL

ijj

i

, 0

∏

≠=

And the interpolation polynomial will be

∑∑

−=

nm

xf

00

The Lij(x,y) polynomials have the property that their

value is zero in all (x,y) points of the grid, except for the

point (xi,yj) where the value is 1.

For n=2 and m=2 we will have for example 9 known

values and 9 Lagrange polynomials. Some of those are

represented in Figure 1.

∏

=

, 0

∑

=

i

≠

−

−

==

n

ijj

ji

j

n

ii

n

i

xx

xx

yxLyxF

0

)()(

∏

=

, 0

∏

=

k

, 0

∑

=

i

∑

=

j

≠

−

−

==

n

ijj

ji

j

n

iii

n

iii

xx

y

xx

yxfxLyxfyxF

0

),()(),(),(

≠

−

−

==

m

jk

kj

k

m

jj

m

j

yy

y

yxFyLyxFyxF

0

),()(),(),(

mj

yy

yy

yL

ni

xx

x

m

jkk

kj

k

j

n

j

j

i

, 0,)(

, 0,)(

, 0

=

−

−

=

=

−

−

=

∏

=≠

∑∑

−

i

=

=

==

j

ijji

n

i

m

j

jiji nm

yxLy

yLxLyxfyxF

00

),(),(

)()(),(),(

Figure 1. Sample Lagrange polynomials for Cartesian

coordinate system. [0,0], [1,0], [2,0], [1,1]

III. BI-DIMENSIONAL LAGRANGE INTERPOLATION IN

POLAR COORDINATES

The same reasoning can be applied for other

orthogonal bi-dimensional systems of coordinates and

one example is the polar one, defined by θ and ρ.

Figure 2. Polar coordinates

The relationship between the Cartesian coordinates

and the polar ones is given by:

ρ1

ρ2

Θ1

Θ0

Θ2

ρ0

71

Page 3

) sin(

) cos(

ρϑ

ϑρ

=

=

y

x

Apart for the geometrical significance of the polar

coordinates, all reasoning behind the bi-dimensional

Lagrange interpolation remains unchanged. We can

build the polar Lagrange base polynomials:

LL

i ij

)(),(

−

=

∏

≠=

ρ

ρ

mjL

niL

L

m

jkk

kj

k

j

n

ijj

ji

j

i

j

, 0,)(

, 0,)(

)(

, 0

=

, 0

=

−

−

=

=

−

=

∏

≠

ρρ

ρ

ϑϑ

ϑϑ

ϑ

ρϑρϑ

And we can obtain then the interpolation function:

∑∑

−=

nm

f

00

The domain of the interpolation defined by [θ0, θn]

and [ρ0, ρm] is not a rectangle any more but a sector. For

the n=2 and m=2 case over a suitable range chosen for

visibility, the same polynomials represented in Figure 1

are redrawn in Figure 3 (polar coordinates).

The polar case has however one particular issue. The

angular coordinate is not infinite, as is the case with the

Cartesian case. Since one prerequisite for proper

interpolation is that the function should be continuous,

together with its derivatives up to the polynomial

degree, we should also require that the polar

interpolation is continuous over the special line θ = 0

overlapping the line θ = 2π.

From the practical point of view, we will have two

cases:

1) The interpolation is done over a limited sector

2) The interpolation is done over the entire range

for θ

Case 1). supports a regular bi-dimensional Lagrange

interpolation yielding reasonable

approaching case 2). the error at the edges of θ range

becomes a bigger problem, altering significantly the

interpolation accuracy.

We are proposing here an implementation solution

for this issue when the θ domain covers the entire

circle.

Since any interpolation function will be naturally

defined in this case over [0, 2π] we can extend it to a

periodical function defined over [-2π,4π], i.e. over three

periods of the original function. Because the original

interpolation function will have to achieve the exact

values in the original n x m grid, the extended

interpolation function will have to achieve the exact

values in the extended grid of size 3n x m. We will not

need more values (i.e. measurements) because all we

have to do is take advantage of the periodicity assumed

for the interpolation function.

∑∑

−

i

=

=

==

j

ijji

n

i

m

j

jiji nm

L

LLfF

00

),(),(

)()(),(),(

ρϑρϑ

ρϑρϑρϑ

results. When

In the end, the useful interval will still be [0, 2π],

meaning that we will get a better error margin, being in

the middle of the overall interval [-2π,4π]

IV ACCURACY COMPARISON

We have implemented the Cartesian and polar

interpolation according to the above considerations in

Matlab [4]. Normally the exact set of values would

come directly or indirectly from measurement. We will

need a reference so we had to choose an exact function.

To provide good visual feedback, we chose a function

whose exact representation resembles the bottom

reinforcement of a PET bottle.

The polar function considered is:

6 4 (),(

−=ρρρθ

f

Or, in Cartesian coordinates:

) 3)5 cos(2 )(3

23

++θ

Figure 3. Sample Lagrange polynomials for

polar coordinate system. [0,0], [1,0], [2,0], [1,1]

72

Page 4

(

( 2

)

⎟

⎠

⎞

⎜

⎝

⎛

+⋅

+−++=

3 ))(5 cos(2

3 ) 32 )(),(

2222

x

y

arctg

yxyxyxf

and its fine-grid representation is shown in Figure 4

Figure 4. Original function to be approximated

The function in Matlab is:

function z = polfun( th, r )

%POLFUN –the polar test function

% th - angle, r – radius

z = (4 * r.^3 - 6 * r.^2 + 3*ones(size(r))) .* (2*cos(5*th)

+ 3*ones(size(r)));

We have considered a Cartesian division

{x, y ∈[-2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2]}

and a polar division

{ θ ∈ [0,20,40,…,340,360]*π/180; ρ ∈ [0,0.5,1,1.5,2]}.

Each division produced a corresponding interpolation,

represented in Figure 5a, respective 5b.

Figure 5a. Lagrange interpolation, Cartesian division

Figure 5b. Lagrange interpolation, polar division

It is obvious that the polar nature of the original

function matters. Even if essentially the Lagrange set of

polynomials is the same, the polar interpolation is

considerably more accurate. However, around the line

θ = 0 even the polar interpolation fails to follow the

original function.

We have also applied the extension described above

to the polar interpolation. The significantly better results

are represented in Figure 6.

Figure 6. Interpolation with extended polar division

III. CONCLUSIONS

Bi-dimensional

polynomials can be done in polar coordinates using the

same logic as in the Cartesian case. We have shown that

the polar coordinates offer an additional advantage,

being periodical over the circle. Choosing the

appropriate coordinate system is important for the

accuracy or the approximation.

All affirmations were tested with practical

implementations in Matlab. Further work may

investigate the impact of coordinate system in other

types of interpolation or for the three-dimensional case.

REFERENCES

[1] A. Tomescu, I.B.L. Tomescu, F.M.G. Tomescu,

“Modelarea Numerică a Câmpului Electromagnetic.

Preliminarii: Câmpuri Statice şi Staţionare″, MATRIX

ROM, Bucureşti, 2003.

[2] S.S. Rao,”Applied Numerical Methods for Engineers and

Scientists”, Pretince Hall, New Jersey, 2002

[3] R. Despa, C. Coculescu, “Metode Numerice”, Editura

Universitară , Bucureşti 2006

[4] S. Nakamura, ″Numerical Analysis and Graphic

Visualization with MATLAB″, Pretince Hall, New Jersey,

1996

[5] E. B. Saff, ″Local Convergence of Lagrange Interpolation

associated with Equidistant

Approximation Theory , Vol. 78, pp. 213-225, 1994.

[6] L. Bos, M. Caliari, S. De Marchi, M. Vianello, Y. Xu,

″Bivariate Lagrange Interpolation at the Padua Points:The

Generating Curve Approach”, Journal of Approximation

Theory , Vol. 143, Issue 1, pp. 15-25, nov. 2006

[7] G. Hecklin, G. Nurnberger, L. Schumaker, F. Zeilfelder,

″A Local Lagrange Interpolation Method based on C1

Cubic Spline on Freudenthal Partitions ″, Mathematics on

Computation, Vol. 77, pp. 1017-1036, nov. 2007

interpolation using Lagrange

Nodes″, Journal of

73