public class NaturalNeighborInterpolator extends Object implements IInterpolatorOverTin
| Constructor and Description |
|---|
NaturalNeighborInterpolator(IIncrementalTin tin)
Construct an interpolator that operates on the specified TIN.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getBarycentricCoordinateDeviation()
Gets the deviation of the computed equivalent of the input query (x,y)
coordinates based on barycentric coordinates.
|
double[] |
getBarycentricCoordinates(List<IQuadEdge> polygon,
double x,
double y)
Given a reference point inside a simple, but potentially non-convex
polygon, creates an array of barycentric coordinates for the point.
|
List<IQuadEdge> |
getBowyerWatsonPolygon(double x,
double y)
Gets a list of edges for the polygonal cavity that would be created
as part of the Bowyer-Watson insertion algorithm.
|
List<IQuadEdge> |
getConnectedPolygon(IQuadEdge e)
Gets a polygon consisting of edges connected to
the specified edge (in effect providing the set of vertices
connected to the starting vertex of the specified edge).
|
String |
getMethod()
Gets a string describing the interpolation method
that can be used for labeling graphs and printouts.
|
double[] |
getSurfaceNormal()
Gets the unit normal to the surface at the position of the most
recent interpolation.
|
double |
interpolate(double x,
double y,
IVertexValuator valuator)
Perform interpolation using Sibson's C0 method.
|
double |
interpolateUsingTestMethod(double x,
double y,
IVertexValuator valuator)
Perform interpolation using Sibson's C0 method and a test algorithm
based on computing the barycentric coordinates rather than
through the circumcenter approach used for the original
interpolation method.
|
boolean |
isSurfaceNormalSupported()
Indicates whether the interpolation class supports the computation
of surface normals through the getUnitNormal() method.
|
void |
resetForChangeToTin()
Used by an application to reset the state data within the interpolator
when the content of the TIN may have changed.
|
public NaturalNeighborInterpolator(IIncrementalTin tin)
tin - a valid instance of an incremental TIN.public void resetForChangeToTin()
resetForChangeToTin in interface IProcessUsingTinpublic double interpolate(double x,
double y,
IVertexValuator valuator)
The domain of the interpolator is limited to the interior of the convex hull. Methods for extending to the edge of the TIN or beyond are being investigated.
The interpolation is treated as undefined at points that lie directly on a constrained edge.
interpolate in interface IInterpolatorOverTinx - the x coordinate for the interpolation pointy - the y coordinate for the interpolation pointvaluator - a valid valuator for interpreting the z value of each
vertex or a null value to use the default.public double interpolateUsingTestMethod(double x,
double y,
IVertexValuator valuator)
The domain of the interpolator is limited to the interior of the convex hull. Methods for extending to the edge of the TIN or beyond are being investigated.
x - the x coordinate for the interpolation pointy - the y coordinate for the interpolation pointvaluator - a valid valuator for interpreting the z value of each
vertex or a null value to use the default.public double getBarycentricCoordinateDeviation()
public List<IQuadEdge> getBowyerWatsonPolygon(double x, double y)
x - A Cartesian coordinate in the coordinate system used for the TINy - A Cartesian coordinate in the coordinate system used for the TINpublic String getMethod()
IInterpolatorOverTingetMethod in interface IInterpolatorOverTinpublic boolean isSurfaceNormalSupported()
IInterpolatorOverTinisSurfaceNormalSupported in interface IInterpolatorOverTinpublic double[] getSurfaceNormal()
NOT COMPLETELY TESTED AND VERIFIED YET. WHen I visually inspect the results, the surface appears to be unexpectedly blurred and flattened. At the very least, I think a code review is required to determine whether the implementation is correct or if the behavior I am seeing is just the way the algorithm works.
getSurfaceNormal in interface IInterpolatorOverTinpublic List<IQuadEdge> getConnectedPolygon(IQuadEdge e)
e - the starting edgepublic double[] getBarycentricCoordinates(List<IQuadEdge> polygon, double x, double y)
polygon - list of edges defining a non-self-intersecting,
potentially non-convex polygon.x - the x coordinate of the reference pointy - the y coordinate of the reference pointCopyright © 2019. All rights reserved.