2d Lagrange Interpolation

 

Directly to the input form

  • Polynomial interpolation in higher dimensions is in the case of complete rectangular grids as easy as in one dimension, especially if one uses the representation by Lagrange's basis polynomials. In this case we have data
    (xi, yj, f(xi, yj ))
    0 <= i <= n, 0 <= j <= m
    and the formula
    p(x,y) = ∑ i=0,..,n , j=0,..,m f i,j Li,n(x) Lj,m(y) .
    Here Li,n(x) resp. Lj,m(y) are the well known basis polynomials of Lagrange in one dimension, for example
    Lj,m(y) = Πk=0 to j-1, j+1 to m (y-yk)/(yj-yk)
  • You can display an interpolating polynomial, the interpolation error or one of the 2d basis functions.
  • you might equally well present your own (x,y,z)-data, of course as an array of n × m points , compute the corresponding interpolating polynomial and evaluate this on a given set of (x,y) coordinates.


Input

 
  • Either you choose to interpolate your own data or you want to play with synthetic data. The input format is described on the input form. In the case of synthetic data:
    1. You fix the underlying rectangle (the x- and the y-grid are chosen equidistant then)
    2. You choose the type of function to be displayed.
    3. If you want to display an interpolating polynomial or its error function then you select the function to be interpolated: either you choose between three predefined cases or you define a function yourself by a piece of FORTRAN-code.
    4. If you want to plot one of the Lagrange basis functions, then you specify the indices of its basis node.
    5. You specify the degrees in x and y.
  • Finally you select a viewpoint by specifying the two rotation angles of the x resp. the z (function) axis.
 

Output

 
  • The selected plot is displayed.
  • In case of data of your own you get a table of interpolated values as desired. be careful! if your interpolation points are outside the rectangle specified by your (x,y,z)-data, then you might get quite strange results.
 

Questions ?!

Makes it sense to select a high interpolation degree?
In which cases, if any?
 
 

The input form

 
Back to the top!

18.02.2015