BLEND
Transfinite Interpolation
BLEND
is a MATLAB library which
"blends" multidimensional data, that is, performs a kind
of interpolation. However, in this case, the data may be known at
points, or curves, or planes, and is to be extended to a higher-dimensional
domain.
This is a common way of creating a smooth set of data based on
a small set of known values. For instance, if we measure the
temperature every hour, we naturally assume that the temperature
at 2:15 can be approximated by "blending" 1/4 of the temperature
at 3:00 and 3/4 of the temperature at 2:00.
Now suppose that we take the temperature at evenly spaced points
on the floor of a room. We can again see how to use blending so
that, in each little square, we take a blend of the values at the
four corners to get the value at any point within the square.
Similar ideas can be used with a cube.
More complicated cases might arise where we know the temperature
everywhere along lines, or along planes that cut through a cube.
Even then, it is possible to blend the data in a smooth and
sensible way.
BLEND interpolates values based on a set of given data.
BLEND can handle input data that is 1, 2, or 3 dimensional.
In the general, 3D case, the data can depend on smoothly varying
space parameters (R,S,T) or on tabular indices (I,J,K). The data
may be given at the corners, edges, or faces of the unit cube.
In the (R,S,T) case, BLEND can supply an interpolated value at
any point in the cube. In the (I,J,K) case, BLEND will fill in
tabular values for all intermediate indices.
In the simplest case, where BLEND is only given data values at the
endpoints of a line segment, the 4 corners of a square, or the 8
corners of a cube, BLEND is equivalent to linear, bilinear
or trilinear finite element interpolation of the data. However,
in the more interesting cases where BLEND is given, say, a formula
for the data along the sides of the square, or the edges of the
cube, the interpolation is called "transfinite", since in theory
it samples the input data at more than a finite number of points.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
BLEND is available in
a C++ version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
TILER_2D,
a FORTRAN90 program which
demonstrates a 2D example of transfinite interpolation.
TILER_3D,
a FORTRAN90 program which
demonstrates a 3D example of transfinite interpolation.
Reference:
-
William Gordon,
Blending-Function Methods of Bivariate and Multivariate
Interpolation and Approximation,
SIAM Journal on Numerical Analysis,
Volume 8, Number 1, March 1971, pages 158-177.
-
William Gordon, Charles Hall,
Transfinite Element Methods: Blending-Function Interpolation over
Arbitrary Curved Element Domains,
Numerische Mathematik,
Volume 21, Number 1, 1973, pages 109-129.
-
William Gordon, Charles Hall,
Construction of Curvilinear Coordinate Systems and Application to
Mesh Generation,
International Journal of Numerical Methods in Engineering,
Volume 7, pages 461-477, 1973.
-
Charles Hall, Thomas Porsching,
Numerical Analysis of Partial Differential Equations,
Prentice-Hall, 1990,
ISBN: 013626557X,
LC: QA374.H29.
-
Joe Thompson, Bharat Soni, Nigel Weatherill,
Handbook of Grid Generation,
CRC Press, 1999.
Source Code:
-
blend_101.m,
extends scalar endpoint data to a line.
-
blend_102.m,
extends scalar point data into a square.
-
blend_103.m,
extends scalar point data into a cube.
-
blend_112.m,
extends scalar line data into a square.
-
blend_113.m,
extends scalar line data into a cube.
-
blend_123.m,
extends scalar face data into a cube.
-
blend_i_0d1.m,
extends indexed scalar data at endpoints along a line.
-
blend_ij_0d1.m,
extends indexed scalar data at corners into a table.
-
blend_ij_1d1.m,
extends indexed scalar data along edges into a table.
-
blend_ij_w_1d1.m,
extends weighted indexed scalar data along edges into a table.
-
blend_ijk_0d1.m,
extends indexed scalar corner data into a cubic table.
-
blend_ijk_1d1.m,
extends indexed scalar edge data into a cubic table.
-
blend_ijk_2d1.m,
extends indexed scalar face data into a cubic table.
-
blend_r_0dn.m,
extends vector data at endpoints into a line.
-
blend_rs_0dn.m,
extends vector data at corners into a square.
-
blend_rs_1dn.m,
extends vector data along sides into a square.
-
blend_rst_0dn.m,
extends vector data at corners into a cube.
-
blend_rst_1dn.m,
extends vector data on edges into a cube.
-
blend_rst_2dn.m,
extends vector data on faces into a cube.
-
r8block_print.m,
prints a real block (a 3D matrix).
-
r8mat_print.m,
prints an R8MAT.
-
r8mat_print_some.m,
prints some of an R8MAT.
-
timestamp.m,
prints the current YMDHMS date as a time stamp.
Examples and Tests:
-
blend_test.m,
calls all the tests.
-
blend_test_output.txt,
the output file.
-
blend_test01.m,
checks for a gross error in the blend coefficients.
-
blend_test02.m,
checks for simple errors in the blend coefficients.
-
blend_test03.m,
checks out BLEND_I_0D1.
-
blend_test04.m,
checks out BLEND_IJ_0D1 and BLEND_IJ_1D1.
-
blend_test05.m,
checks out BLEND_IJK_0D1
-
blend_test06.m,
checks out BLEND_IJK_1D1
-
blend_test07.m,
checks out BLEND_IJK_2D1
-
cubic_rs.m,
evaluates a function of R and S used for some tests.
-
quad_rst.m,
evaluates a function of (R,S,T) used for some tests.
-
identity_r.m,
returns a data component given (R).
-
identity_rs.m,
returns a data component given (R,S).
-
identity_rst.m,
returns a data component given (R,S,T).
-
stretch_r.m,
returns a data component given (R).
-
stretch_rs.m,
returns a data component given (R,S).
-
stretch_rst.m,
returns a data component given (R,S,T).
-
ellipse_rs.m,
maps the boundary of the unit square to an ellipse.
-
sphere_rst.m,
maps the boundary of the unit cube to a sphere.
-
blend_test08.m,
tests BLEND_IJ_W_1D1.
-
blend_test09.m,
tests BLEND_102.
-
blend_test10.m,
tests BLEND_112.
-
blend_test11.m,
tests BLEND_103.
-
blend_test12.m,
tests BLEND_113.
-
blend_test13.m,
tests BLEND_123.
You can go up one level to
the MATLAB source codes.
Last revised on 23 October 2008.