ProGAL.geom3d.complex.delaunayComplex
Class DelaunayComplex

java.lang.Object
  extended by ProGAL.geom3d.complex.delaunayComplex.DelaunayComplex
All Implemented Interfaces:
SimplicialComplex
Direct Known Subclasses:
RegularComplex

public class DelaunayComplex
extends java.lang.Object
implements SimplicialComplex

A Delaunay complex for a set of d-dimensional points is a tesselation of the points such that no point is inside the circumscribing hypersphere of the d-simplices (for the 3D case: Tetrahedra).

This class builds a three-dimensional Delaunay complex in the constructor and accesses it using e.g. the getTetrahedra method. The following example displays the Delaunay complex of ten random points.

  //Generate the complex
  List<Point> pl = PointList.generatePointsInCube(10);
  DelaunayComplex dc = new DelaunayComplex(pl);
    
  //Display the complex
  J3DScene scene = J3DScene.createJ3DSceneInFrame();
  for(CTetrahedron t: dc.getTetrahedra()){
    scene.addShape(t, new Color(200,100,100,100));
  }
  
  

The original point-set is left unaltered and non-referenced by this class. A new set of vertices is allocated using the CVertex class. These are randomly perturbed to avoid degeneracies. If one wishes to associate the original points with a vertex in the complex it would be sufficient to test if the distance between the point and the vertex is less than 0.0001.

The complex is bounded by a big tetrahedron whose corner-points are located sufficiently far from any of the vertices of the complex. The simplices that have one of these 'big points' as corners can not be accessed directly via the getter-methods, but they will be neighbors of other normal simplices. For instance:

  DelaunayComplex dc = new DelaunayComplex( PointList.generatePointsInCube(4) );
  for(CTetrahedron t: dc.getTetrahedra()){
        System.out.println( t.containsBigPoint() );
        System.out.println( t.getNeighbor(0).containsBigPoint() );
        System.out.println( t.getNeighbor(1).containsBigPoint() );
        System.out.println( t.getNeighbor(2).containsBigPoint() );
        System.out.println( t.getNeighbor(3).containsBigPoint() );
  }
  
Will print false, true, true, true and true.

Author:
R.Fonseca

Constructor Summary
DelaunayComplex(java.util.List<Point> points)
          Builds the Delaunay complex of the specified point-set
 
Method Summary
 boolean checkTetrahedra()
          Checks that all tetrahedra comply with the Delaunay-criteria.
 java.util.List<CTetrahedron> getAllTetrahedra()
          returns all tetrahedra (including tetrahedra with bigPoint
 java.util.List<CTetrahedron> getBigTetrahedra()
          returns all big tetrahedra
 java.util.List<CEdge> getEdges()
          Get the edges in the complex.
 java.util.List<CTetrahedron> getTetrahedra()
          Get the tetrahedra in the complex.
 java.util.List<CTriangle> getTriangles()
          Get the triangles in the complex.
 CVertex getVertex(int i)
           
 java.util.Set<CTetrahedron> getVertexHull(CVertex v)
          The vertex-hull of v is the set of all tetrahedrons that has v as a corner-point
 java.util.List<CVertex> getVertices()
          Get the vertices in the complex.
 boolean isDelaunay()
          TODO: Finish
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelaunayComplex

public DelaunayComplex(java.util.List<Point> points)
Builds the Delaunay complex of the specified point-set

Method Detail

isDelaunay

public boolean isDelaunay()
TODO: Finish


getTetrahedra

public java.util.List<CTetrahedron> getTetrahedra()
Get the tetrahedra in the complex. The tetrahedra that has 'big points' as corners are not returned

Specified by:
getTetrahedra in interface SimplicialComplex

getAllTetrahedra

public java.util.List<CTetrahedron> getAllTetrahedra()
returns all tetrahedra (including tetrahedra with bigPoint


getBigTetrahedra

public java.util.List<CTetrahedron> getBigTetrahedra()
returns all big tetrahedra


getTriangles

public java.util.List<CTriangle> getTriangles()
Get the triangles in the complex. The triangles that has 'big points' as corners are not returned

Specified by:
getTriangles in interface SimplicialComplex

getEdges

public java.util.List<CEdge> getEdges()
Get the edges in the complex. The edges that has 'big points' as end-points are not returned

Specified by:
getEdges in interface SimplicialComplex

getVertices

public java.util.List<CVertex> getVertices()
Get the vertices in the complex. The 'big points' are not returned

Specified by:
getVertices in interface SimplicialComplex

getVertex

public CVertex getVertex(int i)

getVertexHull

public java.util.Set<CTetrahedron> getVertexHull(CVertex v)
The vertex-hull of v is the set of all tetrahedrons that has v as a corner-point


checkTetrahedra

public boolean checkTetrahedra()
Checks that all tetrahedra comply with the Delaunay-criteria.