OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

xyz_shep

Contents

Brief Information

Modified Shepard Gridding Method

Command Line Usage

1. xyz_shep iz:=Col(3);

2. xyz_shep iz:=Col(3) rows:=10 cols:=10;

4. xyz_shep iz:=Col(3) q:=13 w:=19;

5. xyz_shep iz:=Col(3) om:=[MBook]MSheet!Mat(1);

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input iz

Input

XYZRange

<active>

Specifies the input XYZ range.

Rows rows

Input

int

20

Rows in the output matrix.

Columns cols

Input

int

20

Columns in the output matrix.

Quadratic q

Input

int

13

The quadratic interplant locality factor, which is used to calculate the influence radius of local approximate quadratic fitted function for each node. By default, q equals to 13. Modifying these factors could increase gridding accuracy, though note that the computation time can be greatly increased for large values (i.e. values that decrease the locality of the method.)

Weight w

Input

int

19

The weight function locality factor, which is used to calculate the weighting radius for each node. By default, w equals to 19. Modifying these factors could increase gridding accuracy, though note that the computation time can be greatly increased for large values (i.e. values that decrease the locality of the method.)

Output Matrix om

Output

MatrixObject

<new>

Specify the output matrix object.

See the syntax here.

Description

This function performs modified Shepard gridding method which described by Renka[1]. This is a distance-based method and improves the Shepard's method by some local strategies. During gridding, only the data points that lying within certain ranges, Rq and Rw, to the grid nodes are considered. To make it easier for setting, two integers, Nq and Nw are used to calculate Rq and Rw (parameters q and w of the function, and called Quadratic Interplant Locality Factor and Weight Function Locality Factor, respectively). Increase the value of Nq and Nw will make the calculation more global, vice versa. Generally speaking, setting Nq and Nw works quite well.

The value of Rq and Rw in this function is varied for each node. There is another similar X-Function xyz_shep_nag which described by Franke and Nielson[2] uses a fixed Rq and Rw calculation.

Examples

1. Import XYZ Random Gaussian.dat on the \Samples\Matrix Conversion and Gridding folder.

2. Type xyz_shep 3 in the command window. Or type xyz_shep -d to bring up the dialog.


For more examples, please refer to XF Script Dialog (press F11).

Algorithm

This is a distance-based weighted gridding method which interpolate data by:

Image:xyz_shep_help_English_files_image002.gif,

where Fi is the underlying function at nodes (xi, yi), and Wi(x, y) is the weights. To make the function more local, Fi and Wi are calculated only by the data points lying in the circle with center (xi, yi) and some radius R..

Firstly, the weights are defined as:

Image:xyz_shep_help_English_files_image004.gif.

Given a radius (Rw, the relative weight (wk is:

Image:xyz_shep_help_English_files_image006.gif for

Image:xyz_shep_help_English_files_image008.gif,

and (dk is the Euclidean distance between (x, y) and (xk, yk):

Image:xyz_shep_help_English_files_image010.gif.

For any (Rw >0, we have:

Image:xyz_shep_help_English_files_image012.gif

Image:xyz_shep_help_English_files_image014.gif.

Secondly, the nodal function (Fi is replaced by a local approximation function Qk:

Image:xyz_shep_help_English_files_image016.gif

(Qk is the weighted least-square quadratic fitted function to the data located within (Rq of nodal points. So the coefficients minimize:

Image:xyz_shep_help_English_files_image018.gif

for

Image:xyz_shep_help_English_files_image020.gif.

It can be seen above that the interpolate function is a local approximation function and depends on the radius of influence about nodal points, (Rq and (Rw. In this method, (Rq and (Rw are varied for each nodal point to make the calculation more accurate. Given two integers (Nq and (Nw, (Rq and (Rw are chosen just large enough to include (Nq and (Nw nodes.

References

[1]. Renka, R. J., Multivariate Interpolation of Large Sets of Scattered Data. ACM Transactions on Mathematical Software, Vol. 14, No. 2, June 1988, pp:139-148.

[2]. Franke R and Nielson G. smooth Interpolation of Large Sets of Scattered Data. Internat. J.Num. Methods Engrg. 1980, 15 pp:1691-1704.

Related X-Functions

xyz_regular, xyz_renka, xyz_renka_nag, xyz_shep_nag, xyz_sparse, xyz_tps