# 16.4 XYZ Trace Interpolation

## Description

XYZ Trace Interpolation performs two-dimensional interpolation on data exhibiting some periodicity. Ordinary interpolation methods perform "nearest neighbor" calculations which have the potential to ignore trends in cyclic data. Trace interpolation acts on the curve based on row index number, thus preserving the sequential aspect of the data. Choose from one of three methods: Linear, Cubic Spline and Cubic B-Spline.

##### To Perform Trace Interpolation on XYZ Data
1. Select Analysis: Mathematics: XYZ Trace Interpolation.... This opens the interpxyz dialog box.
2. Specify the Input and desired Method as well as Number of Points.
3. Upon clicking OK, three new columns containing XYZ interpolated values are added on the initial data worksheet (other output options are available).

## Dialog Options

Recalculate Controls recalculation of analysis results None Auto Manual For more information, see: Recalculating Analysis Results Specifies the XYZ range to be interpolated. For help with range controls, see: Specifying Your Input Data Specify the interpolation/extrapolation method. Linear Linear interpolation is a fast method of estimating a data point by constructing a line between two neighboring data points. This method is generally less accurate than more computationally-intensive methods. Cubic Spline This method splits the input data into a given number of pieces, and fits each segment with a cubic polynomial. The second derivative of each cubic function is set equal to zero. With these boundary conditions met, an entire function can be constructed in a piece-wise manner. Cubic B-Spline This method also splits the input data into pieces. Each segment is fitted with discrete Bezier splines. The number of interpolated points. Specifies the output XY data range

## Examples

1. Import Interpolation.dat, which is in the <Origin Installation Directory>\Samples\Mathematics\ folder.
2. Highlight Column C and set the column designation to Z. Then select Analysis: Mathematics: XYZ Trace Interpolation from the Origin menu to bring up the dialog.
3. Note that the Input branch has been filled with the proper data range. Then select the Cubic Spline interpolation method.
4. Click OK to perform the interpolation.

## Algorithm

In general, between two adjacent data points, the data points will be interpolated so that the number of data points in the final result data set will be equal to the Number of Points variable.

The detailed algorithm is described below:

Given a sequence of distinct triplets of data ($x_i\,$, $y_i\,$,$z_i\,$), where i = 0, 1, ... n-1:

For $x_i,

For $y_i,

For $z_i,

where j=1,2,3...(npts-1), and npts is the value of Number of Points.