public final class Tincalc extends Object
Modifier and Type | Method and Description |
---|---|
static double |
sampleSpacing(double area,
int n)
Estimates the average distance between point samples distributed randomly
within a specified area with approximately uniform density,
specified in arbitrary units.
|
public static double sampleSpacing(double area, int n)
The approximation used by this method makes the simplifying assumption that the points are organized in a regular tessellation of equilateral triangles. For a sufficiently large number of points, N, the number of triangles in the tessellation approaches 2N. And, for area, A, the area of individual triangles approaches A/2N. The approximate space between points is just the length of the side of one of these triangles.
The quality of this estimate improves with increasing point count and input data that conforms to the assumptions of the approximation. Note that the 2N triangle ratio is also true for Delaunay Triangulations.
area
- the area of the region containing pointsn
- the number of pointsCopyright © 2021. All rights reserved.