HE_Mesh2014  2.0.11
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
wblut.geom.WB_Delaunay Class Referenceabstract

Inherited by wblut.geom.WB_Delaunay.DelaunayClarkson, wblut.geom.WB_Delaunay.DelaunayFast, and wblut.geom.WB_Delaunay.DelaunayWatson.

Classes

class  DelaunayClarkson
 
class  DelaunayFast
 
class  DelaunayWatson
 

Public Member Functions

boolean test (final double[][] samples)
 
boolean test (final double[][] samples, final boolean printErrors)
 
void improve (final double[][] samples, final int pass)
 
void finish_triang (final double[][] samples)
 
String toString ()
 
String sampleString (final double[][] samples)
 

Static Public Member Functions

static WB_Delaunay getTriangulation2D (final WB_Coordinate[] points, final boolean exact)
 
static WB_Delaunay getTriangulation2D (final WB_Coordinate[] points)
 
static WB_Delaunay getTriangulation2D (final WB_Coordinate[] points, final double epsilon, final boolean exact)
 
static WB_Delaunay getTriangulation2D (final WB_Coordinate[] points, final double epsilon)
 
static WB_Delaunay getTriangulation3D (final WB_Coordinate[] points, final double closest)
 
static WB_Delaunay getTriangulation3D (final WB_Coordinate[] points, final double closest, final double epsilon)
 
static WB_Delaunay getTriangulation3D (final WB_CoordinateSequence points, final double closest)
 
static WB_Delaunay getTriangulation3D (final WB_CoordinateSequence points, final double closest, final double epsilon)
 
static WB_Delaunay getTriangulation4D (final WB_Coordinate[] points, final double closest)
 
static WB_Delaunay getTriangulation4D (final WB_Coordinate[] points, final double closest, final double epsilon)
 
static WB_Delaunay getTriangulation2D (final List<?extends WB_Coordinate > points, final boolean exact)
 
static WB_Delaunay getTriangulation2D (final List<?extends WB_Coordinate > points, final double epsilon, final boolean exact)
 
static WB_Delaunay getTriangulation2D (final List<?extends WB_Coordinate > points)
 
static WB_Delaunay getTriangulation2D (final List<?extends WB_Coordinate > points, final double epsilon)
 
static WB_Delaunay getTriangulation3D (final List<?extends WB_Coordinate > points, final double closest)
 
static WB_Delaunay getTriangulation3D (final List<?extends WB_Coordinate > points, final double closest, final double epsilon)
 
static WB_Delaunay getTriangulation4D (final List<?extends WB_Coordinate > points, final double closest)
 
static WB_Delaunay getTriangulation4D (final List<?extends WB_Coordinate > points, final double closest, final double epsilon)
 
static double[][] scale (final double[][] samples, final double mult, final boolean copy)
 
static double[][] perturb (final double[][] samples, final double epsilon, final boolean copy)
 

Public Attributes

int[][] Tri
 
int[][] Vertices
 
int[][] Neighbors
 
int[][] Walk
 
int[][] Edges
 
int NumEdges
 
double[] circumradii
 
WB_Point[] circumcenters
 

Protected Member Functions

 WB_Delaunay ()
 

Static Protected Member Functions

static WB_Delaunay getTriangulation (final double[][] samples, final double closest, final boolean exact)
 

Detailed Description

Delaunay represents an abstract class for calculating an N-dimensional Delaunay triangulation, that can be extended to allow for various triangulation algorithms.

Constructor & Destructor Documentation

wblut.geom.WB_Delaunay.WB_Delaunay ( )
protected

The abstract constructor initializes the class's data arrays.

Member Function Documentation

void wblut.geom.WB_Delaunay.finish_triang ( final double  samples[][])

calculate a triangulation's helper arrays, Walk and Edges, if the triangulation algorithm hasn't calculated them already. Any extension to the Delaunay class should call finish_triang() at the end of its triangulation constructor.

Parameters
sampleslocations of points for topology - dimensioned double[dimension][number_of_points]
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation ( final double  samples[][],
final double  closest,
final boolean  exact 
)
staticprotected

The factory class method heuristically decides which extension to the Delaunay abstract class to use in order to construct the fastest triangulation, and calls that extension, returning the finished triangulation. The method chooses from among the Fast, Clarkson, and Watson methods.

Parameters
sampleslocations of points for topology - dimensioned double[dimension][number_of_points]
closest
exactflag indicating need for exact Delaunay triangulation
Returns
a topology using an appropriate sub-class of Delaunay
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation2D ( final WB_Coordinate[]  points,
final boolean  exact 
)
static
Parameters
points
exact
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation2D ( final WB_Coordinate[]  points)
static
Parameters
points
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation2D ( final WB_Coordinate[]  points,
final double  epsilon,
final boolean  exact 
)
static
Parameters
points
epsilon
exact
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation2D ( final WB_Coordinate[]  points,
final double  epsilon 
)
static
Parameters
points
epsilon
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation2D ( final List<?extends WB_Coordinate points,
final boolean  exact 
)
static
Parameters
points
exact
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation2D ( final List<?extends WB_Coordinate points,
final double  epsilon,
final boolean  exact 
)
static
Parameters
points
epsilon
exact
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation2D ( final List<?extends WB_Coordinate points)
static
Parameters
points
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation2D ( final List<?extends WB_Coordinate points,
final double  epsilon 
)
static
Parameters
points
epsilon
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation3D ( final WB_Coordinate[]  points,
final double  closest 
)
static
Parameters
points
closest
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation3D ( final WB_Coordinate[]  points,
final double  closest,
final double  epsilon 
)
static
Parameters
points
closest
epsilon
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation3D ( final WB_CoordinateSequence  points,
final double  closest 
)
static
Parameters
points
closest
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation3D ( final WB_CoordinateSequence  points,
final double  closest,
final double  epsilon 
)
static
Parameters
points
closest
epsilon
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation3D ( final List<?extends WB_Coordinate points,
final double  closest 
)
static
Parameters
points
closest
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation3D ( final List<?extends WB_Coordinate points,
final double  closest,
final double  epsilon 
)
static
Parameters
points
closest
epsilon
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation4D ( final WB_Coordinate[]  points,
final double  closest 
)
static
Parameters
points
closest
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation4D ( final WB_Coordinate[]  points,
final double  closest,
final double  epsilon 
)
static
Parameters
points
closest
epsilon
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation4D ( final List<?extends WB_Coordinate points,
final double  closest 
)
static
Parameters
points
closest
Returns
static WB_Delaunay wblut.geom.WB_Delaunay.getTriangulation4D ( final List<?extends WB_Coordinate points,
final double  closest,
final double  epsilon 
)
static
Parameters
points
closest
epsilon
Returns
void wblut.geom.WB_Delaunay.improve ( final double  samples[][],
final int  pass 
)

use edge-flipping to bring the current triangulation closer to the true Delaunay triangulation.

Parameters
sampleslocations of points for topology - dimensioned double[dimension][number_of_points]
passthe number of passes the algorithm should take over all edges (however, the algorithm terminates if no edges are flipped for an entire pass).
static double [][] wblut.geom.WB_Delaunay.perturb ( final double  samples[][],
final double  epsilon,
final boolean  copy 
)
static

increments samples coordinates by random numbers between -epsilon and epsilon, in order to eliminate triangulation problems such as co-linear and co-located points.

Parameters
sampleslocations of points for topology - dimensioned double[dimension][number_of_points]
epsilonsize limit on random perturbations
copyspecifies whether perturb should modify and return the argument samples array or a copy
Returns
array of perturbed values
String wblut.geom.WB_Delaunay.sampleString ( final double  samples[][])
Parameters
sampleslocations of points for topology - dimensioned double[dimension][number_of_points] - may be null
Returns
a String representation of this, including samples if it is non-null
static double [][] wblut.geom.WB_Delaunay.scale ( final double  samples[][],
final double  mult,
final boolean  copy 
)
static

alters the values of the samples by multiplying them by the mult factor.

Parameters
sampleslocations of points for topology - dimensioned double[dimension][number_of_points]
multmultiplication factor
copyspecifies whether scale should modify and return the argument samples array or a copy
Returns
array of scaled values
boolean wblut.geom.WB_Delaunay.test ( final double  samples[][])

check this triangulation in various ways to make sure it is constructed correctly. This method is expensive, provided mainly for debugging purposes.

Parameters
sampleslocations of points for topology - dimensioned double[dimension][number_of_points]
Returns
flag that is false to indicate there are problems with the triangulation
boolean wblut.geom.WB_Delaunay.test ( final double  samples[][],
final boolean  printErrors 
)
Parameters
samples
printErrors
Returns
String wblut.geom.WB_Delaunay.toString ( )
Returns
a String representation of this

Member Data Documentation

WB_Point [] wblut.geom.WB_Delaunay.circumcenters
double [] wblut.geom.WB_Delaunay.circumradii
int [][] wblut.geom.WB_Delaunay.Edges

tri/tetra edges –> global edge number.

Edges = new int[ntris][3 * (dim - 1)];

'global edge number' is the number of an edge that is unique among the whole triangulation. This number is not an index into any array, but will match for a shared edge between two triangles.

int [][] wblut.geom.WB_Delaunay.Neighbors
int wblut.geom.WB_Delaunay.NumEdges

number of unique global edge numbers.

int [][] wblut.geom.WB_Delaunay.Tri

triangles/tetrahedra –> vertices.

Tri = new int[ntris][dim + 1]

This is the key output, a list of triangles (in two dimensions, tetrahedra in three dimensions, etc). ntris is the number of triangles.

In 2-D, Tri[i] is an array of 3 integers, which are three indices into the samples[0] and samples[1] arrays to get the x and y values of the three vertices of the triangle.

In 3-D, Tri[i] is an array of 4 integers, which are four indices into the samples[0], samples[1] and samples[2] arrays to get the x, y and z values of the four vertices of the tetrahedron.

This pattern continues for higher dimensionalities.

int [][] wblut.geom.WB_Delaunay.Vertices

vertices –> triangles/tetrahedra.

Vertices = new int[nrs][nverts[i]]

nrs is the number of samples (the length of the samples[0] and samples[1] arrays. For sample i, Vertices[i] is a (variable length) list of indices into the Tri array above, giving the indices of the triangles that include vertex i.

nverts is an array as the second index of the Vertices array since different vertices may be part of different numbers of triangles.

You can use Tri and Vertices together to traverse the triangulation. If you don't need to traverse, then you can probably ignore all arrays except Tri.

int [][] wblut.geom.WB_Delaunay.Walk

triangles/tetrahedra –> triangles/tetrahedra.

Walk = new int[ntris][dim + 1]

Also useful for traversing the triangulation, in this case giving the indices of triangles that share edges with the current triangle.


The documentation for this class was generated from the following file: