public class DiscreteSibsonGridder3 extends java.lang.Object implements Gridder3
In this approximation, all scattered points (x1,x2,x3) are rounded to the nearest uniformly sampled points. If two or more known samples fall into a single uniform sample bin, their values f(x1,x2,x3) are averaged to obtain the value g(x1,x2,x3) for that bin. Values of g(x1,x2,x3) for all other bins are computed to approximate natural neighbor interpolation.
The primary goal of this implementation is simplicity. Like the method of Park et al. (2006), it requires no Delaunay triangulation or Voronoi tesselation, and its cost decreases as the number of known samples increases. Moreover, unlike the method of Park et al., this method uses no auxilary data structure such as a k-D tree to find nearest known samples. Computational complexity of this method is within a constant factor of that of Park et al.
Discrete implementations of Sibson's interpolation can produce artifacts (small axis-aligned ridges or valleys) caused by sampling circles on a rectangular grid. To attenuate these artifacts, this method applies some number of Gauss-Seidel iterations of bi-Laplacian smoothing to the interpolated samples, without modifying the known samples.
References: Park, S.W., L. Linsen, O. Kreylos, J.D. Owens, B. Hamann, 2006, Discrete Sibson interpolation: IEEE Transactions on Visualization and Computer Graphics, v. 12, 243-253. Sibson, R., 1981, A brief description of natural neighbor interpolation, in V. Barnett, ed., Interpreting Multivariate Data: John Wiley and Sons, 21-36.
Constructor and Description |
---|
DiscreteSibsonGridder3(float[] f,
float[] x1,
float[] x2,
float[] x3)
Constructs a nearest neighbor gridder with specified known samples.
|
Modifier and Type | Method and Description |
---|---|
float[][][] |
grid(Sampling s1,
Sampling s2,
Sampling s3)
Computes gridded sample values from the known sample values.
|
void |
setScattered(float[] f,
float[] x1,
float[] x2,
float[] x3)
Sets the known (scattered) samples.
|
public DiscreteSibsonGridder3(float[] f, float[] x1, float[] x2, float[] x3)
f
- array of known sample values f(x1,x2).x1
- array of known sample x1 coordinates.x2
- array of known sample x2 coordinates.x3
- array of known sample x3 coordinates.public void setScattered(float[] f, float[] x1, float[] x2, float[] x3)
Gridder3
setScattered
in interface Gridder3
f
- array of sample values f(x1,x2,x3).x1
- array of sample x1 coordinates.x2
- array of sample x2 coordinates.x3
- array of sample x3 coordinates.public float[][][] grid(Sampling s1, Sampling s2, Sampling s3)
Gridder3