GMS:Linear: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
If the linear interpolation scheme is selected, the [[GMS:2D Scatter Point Module|2D scatter points]] are first triangulated to form a temporary [[GMS:TIN Module|TIN]]. The TIN is a network of triangles connecting the scatter points together. It is used to interpolate from the scatter points to another object such as a grid or a mesh.
If the linear interpolation scheme is selected, the data points are first triangulated to form a network of triangles. The equation of the plane defined by the three vertices of a triangle is as follows:


The equation of the plane defined by the three vertices of a triangle is as follows:
<!--<math>\ Ax+By+Cz+D = 0</math>-->
:[[Image:linear_eq1.jpg]]


Ax + By + Cz + D = 0
:where ''A'', ''B'', ''C'', and ''D'' are computed from the coordinates of the three vertices ''(x1,y1,z1)'', ''(x2,y2,z2)'', and ''(x3,y3,z3)'':


where A, B, C, and D are computed from the coordinates of the three vertices (x1,y1,z1), (x2,y2,z2), & (x3,y3,z3):
:<math>\ A = y_1(z_2-z_3) + y_2(z_3-z_1) + y_3(z_1-z_2)</math>


A = y<sub>1</sub>(z<sub>2</sub>-z<sub>3</sub>) + y<sub>2</sub>(z<sub>3</sub>-z<sub>1</sub>) + y<sub>3</sub>(z<sub>1</sub>-z<sub>2</sub>)
:<math>\ B = z_1(x_2-x_3) + z_2(x_3-x_1) + z_3(x_1-x_2)</math>


B = z<sub>1</sub>(x<sub>2</sub>-x<sub>3</sub>) + z<sub>2</sub>(x<sub>3</sub>-x<sub>1</sub>) + z<sub>3</sub>(x<sub>1</sub>-x<sub>2</sub>)
:<math>\ C = x_1(y_2-y_3) + x_2(y_3-y_1) + x_3(y_1-y_2)</math>


C = x<sub>1</sub>(y<sub>2</sub>-y<sub>3</sub>) + x<sub>2</sub>(y<sub>3</sub>-y<sub>1</sub>) + x<sub>3</sub>(y<sub>1</sub>-y<sub>2</sub>)
:<math>\ D = -Ax_1 - By_1 - Dz_1</math>
D = -Ax<sub>1</sub> - By<sub>1</sub> - Dz<sub>1</sub>


The plane equation can also be written as:
The plane equation can also be written as:


[[Image:linear_eq6.gif]]
:<math>z = f(x,y) = -\frac{A}{C}x-\frac{B}{C}y-\frac{D}{C}</math>


which is the form of the plane equation used to compute the elevation at any point on the triangle.
:which is the form of the plane equation used to compute the elevation at any point on the triangle.


Since a TIN only covers the convex hull of a scatter point set, extrapolation beyond the convex hull is not possible with the linear interpolation scheme. Any points outside the convex hull of the scatter point set are assigned the default extrapolation value entered at the bottom of the Interpolation Options dialog. The figure below shows a 2D scatter point set (small red triangles) being interpolated to a 2D grid. The green lines represent a TIN constructed from a scatter point set. The thick blue line represents the convex hull of the data set. No extrapolation will occur outside of this thick blue line.
Since the network of triangles only covers the convex hull of the point data, extrapolation beyond the convex hull is not possible with the linear interpolation scheme. Any points outside the convex hull of the point data are assigned the default extrapolation value entered in the ''Interpolation Options'' dialog. The figure below shows a network of triangles created from point data.


{{hide in print|[[Image:convex_hull.jpg]]}}
:{{hide in print|[[File:convex_hull.jpg|thumb|none|left|300 px|Network of triangles]]}}
{{only in print|[[Image:convex_hull.jpg|250px|center|''Convex Hull of a Scatter Point Set'']]}}
:{{only in print|[[File:convex_hull.jpg|275px|frame|center|Network of triangles]]}}




Line 33: Line 32:


{{Navbox GMS}}
{{Navbox GMS}}
[[Category:Equations|L]]
[[Category:Interpolation|L]]

Latest revision as of 21:50, 9 June 2022

If the linear interpolation scheme is selected, the data points are first triangulated to form a network of triangles. The equation of the plane defined by the three vertices of a triangle is as follows:

Linear eq1.jpg
where A, B, C, and D are computed from the coordinates of the three vertices (x1,y1,z1), (x2,y2,z2), and (x3,y3,z3):

The plane equation can also be written as:

which is the form of the plane equation used to compute the elevation at any point on the triangle.

Since the network of triangles only covers the convex hull of the point data, extrapolation beyond the convex hull is not possible with the linear interpolation scheme. Any points outside the convex hull of the point data are assigned the default extrapolation value entered in the Interpolation Options dialog. The figure below shows a network of triangles created from point data.

Network of triangles


See also