# How Spline works

The Spline tool uses an interpolation method that estimates values using a mathematical function that minimizes overall surface curvature, resulting in a smooth surface that passes exactly through the input points.

## Conceptual background

Conceptually, the sample points are extruded to the height of their magnitude; spline bends a sheet of rubber that passes through the input points while minimizing the total curvature of the surface. It fits a mathematical function to a specified number of nearest input points while passing through the sample points. This method is best for generating gently varying surfaces such as elevation, water table heights, or pollution concentrations.

The basic form of the minimum curvature Spline interpolation imposes the following two conditions on the interpolant:

- The surface must pass exactly through the data points.
- The surface must have minimum curvature—the cumulative sum of the squares of the second derivative terms of the surface taken over each point on the surface must be a minimum.

The basic minimum curvature technique is also referred to as thin plate interpolation. It ensures a smooth (continuous and differentiable) surface, together with continuous first-derivative surfaces. Rapid changes in gradient or slope (the first derivative) can occur in the vicinity of the data points; hence, this model is not suitable for estimating second derivative (curvature).

The basic interpolation technique can be applied by using a value of zero for the Weight argument to the Spline tool.

## Spline types

There are two Spline methods: Regularized and Tension. The Regularized method creates a smooth, gradually changing surface with values that may lie outside the sample data range. The Tension method controls the stiffness of the surface according to the character of the modeled phenomenon. It creates a less smooth surface with values more closely constrained by the sample data range.

### Regularized spline type

The REGULARIZED option modifies the minimization criteria so third-derivative terms are incorporated into the minimization criteria. The Weight parameter specifies the weight attached to the third-derivative terms during minimization, referred to as *τ* (tau) in the literature. Higher values of this term lead to smoother surfaces. Values between 0 and 0.5 are suitable. Using the REGULARIZED option ensures a smooth surface together with smooth first-derivative surfaces. This technique is useful if the second derivative of the interpolated surface needs to be computed.

### Tension spline type

The TENSION option modifies the minimization criteria so first-derivative terms are incorporated into the minimization criteria. The Weight parameter specifies the weight attached to the first-derivative terms during minimization, referred to as Φ (phi) in the literature. A weight of zero results in the basic thin plate Spline interpolation. Using a larger value of weight reduces the stiffness of the plate, and in the limit as phi approaches infinity, the surface approximates the shape of a membrane, or rubber sheets, passing through the points. The interpolated surface is smooth. First derivatives are continuous but not smooth.

## Additional spline parameters

Further control of the output surface is accomplished through two additional parameters: weight and number of points.

### Weight parameter

For the Regularized Spline method, the Weight parameter defines the weight of the third derivatives of the surface in the curvature minimization expression. The higher the weight, the smoother the output surface. The values entered for this parameter must be equal to or greater than zero. The typical values that may be used are 0, 0.001, 0.01, 0.1, and 0.5.

For the Tension Spline method, the Weight parameter defines the weight of tension. The higher the weight, the coarser the output surface. The values entered must be equal to or greater than zero. The typical values are 0, 1, 5, and 10.

### Number of points parameter

The Number of points identifies the number of points used in the calculation of each interpolated cell. The more input points you specify, the more each cell is influenced by distant points and the smoother the output surface is. The larger the number of points, the longer it will take to process the output raster.

## Spline equation

The algorithm used for the Spline tool uses the following formula for the surface interpolation:

- where:
j = 1, 2, ..., N

N is the number of points.

λ

_{j}are coefficients found by the solution of a system of linear equations.r

_{j}is the distance from the point (x,y) to the j^{th}point.

T(x,y) and R(r) are defined differently, depending on the selected option.

For computational purposes, the entire space of the output raster is divided into blocks or regions equal in size. The number of regions in x and in y directions are the same, and they are rectangular in shape. The number of regions is determined by dividing the total amount of points in the input point dataset by the value specified for the number of points. For data less uniformly distributed, the regions may contain a significantly different number of points, with the value for the number of points being only the rough average. If in any region, the number of points is smaller than eight, the region is expanded until it contains a minimum of eight points.

### For the REGULARIZED option

T(x,y) = a_{1}+ a_{2}x + a_{3}y

- where:
a

_{i}are coefficients found by the solution of a system of linear equations.

And,

- where:
r is the distance between the point and the sample.

is the Weight parameter.

K

_{o}is the modified Bessel function.c is a constant equal to 0.577215.

### For the TENSION option

T(x,y) = a_{1}

- where:
a

_{1}is a coefficient found by the solution of a system of linear equations.

And,

- where:
r is the distance between the point and the sample.

φ

^{2}is the Weight parameter.K

_{o}is the modified Bessel function.c is a constant equal to 0.577215.

## Regional processing of output

For computational purposes, the entire space of the output raster is divided into blocks or regions equal in size. The number of regions in x and in y directions are the same, and they are rectangular in shape. The number of regions is determined by dividing the total amount of points in the input point dataset by the value specified for the number of points. For data less uniformly distributed, the regions may contain a significantly different number of points, with the value for the number of points being only the rough average. If, in any region, the number of points is smaller than eight, the region is expanded until it contains a minimum of eight points.

## References

Franke, R. 1982. Smooth Interpolation of Scattered Data by Local Thin Plate Splines. *Computer and Mathematics with Appllications*. Vol. 8. No. 4. pp. 273–281. Great Britain.

Mitas, L., and H. Mitasova. 1988. General Variational Approach to the Interpolation Problem. *Computer and Mathematics with Appllications*. Vol. 16. No. 12. pp. 983–992. Great Britain.