Class DelaunayTriangulation


  • public class DelaunayTriangulation
    extends Triangulation
    A 2D Delaunay Triangulation (DT) with incremental site insertion. This is not the fastest way to build a DT, but it's a reasonable way to build the DT incrementally and it makes a nice interactive display. There are several O(n log n) methods, but they require that either (1) the sites are all known initially or (2) the sites are inserted in random order.
    Author:
    Paul Chew Created July 2005. Derived from an earlier, messier version.
    • Field Detail

      • debug

        public boolean debug
    • Constructor Detail

      • DelaunayTriangulation

        public DelaunayTriangulation​(org.openjump.core.graph.delauneySimplexInsert.Simplex triangle)
        Constructor. All sites must fall within the initial triangle.
        Parameters:
        triangle - the initial triangle
    • Method Detail

      • locate

        public org.openjump.core.graph.delauneySimplexInsert.Simplex locate​(Pnt point)
        Locate the triangle with point (a Pnt) inside (or on) it.
        Parameters:
        point - the Pnt to locate
        Returns:
        triangle (Simplex) that holds the point; null if no such triangle
      • delaunayPlace

        public Set delaunayPlace​(Pnt site)
        Place a new point site into the DT.
        Parameters:
        site - the new Pnt
        Returns:
        set of all new triangles created
      • main

        public static void main​(String[] args)
        Main program; used for testing.