|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ProGAL.geom3d.complex.delaunayComplex.DelaunayComplex
public class DelaunayComplex
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.
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 |
---|
public DelaunayComplex(java.util.List<Point> points)
Method Detail |
---|
public boolean isDelaunay()
public java.util.List<CTetrahedron> getTetrahedra()
getTetrahedra
in interface SimplicialComplex
public java.util.List<CTetrahedron> getAllTetrahedra()
public java.util.List<CTetrahedron> getBigTetrahedra()
public java.util.List<CTriangle> getTriangles()
getTriangles
in interface SimplicialComplex
public java.util.List<CEdge> getEdges()
getEdges
in interface SimplicialComplex
public java.util.List<CVertex> getVertices()
getVertices
in interface SimplicialComplex
public CVertex getVertex(int i)
public java.util.Set<CTetrahedron> getVertexHull(CVertex v)
public boolean checkTetrahedra()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |