|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uchicago.src.sim.space.Delaunay
This is an implementation of the guibas and stolfi incremental algorithm for finding the delaunay triangulation of a set of points. After playing around with several algorithms, including the divide and conquer included in that artical, I decided that this was the fastest. It also allows us to add additional points to the triangulation, although this is tricky if the point is outside the original triangulation. It employs the QuadEdge data structure. For more info see: Guibas, L. and Stolfi, J., "Primitives for the Manipulation of General Subdivisions and the Computation of Voronoi Diagrams", ACT TOG, 4(2), April, 1985.
| Field Summary | |
QuadEdge[] |
edges
|
SpatialNode[] |
nodes
|
| Constructor Summary | |
Delaunay()
construct a triangulation object |
|
| Method Summary | |
static boolean |
ccw(SpatialNode a,
SpatialNode b,
SpatialNode c)
determine if the points are oriented in counter-clock wise fasion |
void |
findInfiniteTriangle(SpatialNode[] nodes)
calculate the infinite triangle. |
static boolean |
inCircle(SpatialNode a,
SpatialNode b,
SpatialNode c,
SpatialNode d)
primitive to determine if a point is in the circle created by three other points. |
void |
insertPoints(SpatialNode[] nodes)
Insert an array of points into the triangulation. |
boolean |
isOn(SpatialNode x,
QuadEdge e)
is point on edge |
boolean |
leftOf(SpatialNode x,
QuadEdge e)
is point left of edge |
void |
removeEdge(QuadEdge e)
remove an individual edge from the structure. |
void |
removeInfiniteTriangle()
delete the edges from the infinite triangle. |
void |
resetEdges(int len)
clear all of the edges |
boolean |
rightOf(SpatialNode x,
QuadEdge e)
is point right of edge |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public QuadEdge[] edges
public SpatialNode[] nodes
| Constructor Detail |
public Delaunay()
| Method Detail |
public void findInfiniteTriangle(SpatialNode[] nodes)
nodes - public void removeInfiniteTriangle()
public void insertPoints(SpatialNode[] nodes)
nodes -
public static boolean ccw(SpatialNode a,
SpatialNode b,
SpatialNode c)
a - b - c -
public static boolean inCircle(SpatialNode a,
SpatialNode b,
SpatialNode c,
SpatialNode d)
a - b - c - d -
public void resetEdges(int len)
len - public void removeEdge(QuadEdge e)
e -
public boolean rightOf(SpatialNode x,
QuadEdge e)
x - e -
public boolean leftOf(SpatialNode x,
QuadEdge e)
x - e -
public boolean isOn(SpatialNode x,
QuadEdge e)
x - e -
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||