﻿ Geometric Tools: Source - Mathematics - Interpolation

## Mathematics: Interpolation

 Akima interpolation for points (x,f(x)) with nonuniform or uniform spacing. Akima interpolation for points (x,y,f(x,y)) with uniform spacing, but the x-spacing and y-spacing does not have to be the same; that is, anisotropic pixels are allowed. Akima interpolation for points (x,y,z,f(x,y,z)) with uniform spacing, but the x-spacing, y-spacing, and z-spacing do not have to be the same; that is, anisotropic voxels are allowed. B-spline interpolation with uniform knots on images of any dimension. See the sample application Samples/Imagics/BSplineInterpolation for an example of how to use the classes. Bilinear or bicubic interpolation for points (x,y,f(x,y)) with uniform spacing, but the x-spacing and y-spacing do not have to be the same; that is, anisotropic pixels are allowed. Piecewise linear interpolation of unordered data of the form (x,y,f(x,y)). Piecewise linear interpolation of unordered data of the form (x,y,z,f(x,y,z)). Piecewise quadratic interpolation of unordered data of the form (x,y,f(x,y)). The code uses Delaunay triangulation to order the data. The interpolation algorithm is by Zoltan J. Cendes and Steven H. Wong (a reference is given in the header file). The resulting interpolation is globally C1 and has local control. Thin plate splines for 2D data of the form (x,y,f(x,y)) and 3D data of the form (x,y,z,f(x,y,z). The code scales the input (x,y) data to the unit square or the input data (x,y,z) to the unit cube before applying the interpolation algorithm. This remapping is for numerical stability, but it is easy enough to remove it if not desired. Trilinear or tricubic interpolation for points (x,y,z,f(x,y,z)) with uniform spacing, but the x-spacing, y-spacing, and z-spacing do not have to be the same; that is, anisotropic voxels are allowed. Spherical interpolation. Uses spherical coordinates to represent the data, uses periodicity to add additional data points to allow wrap-around in a Delaunay triangulation, then applies the Cendes-Wong algorithm for C1 quadratic interpolation over an arbitrary grid. Vector field interpolation. Uses a Cendes-Wong interpolator for each component (x1(x0,y0),y1(x0,y0)) of the vector field.