hydroScalingAPI.examples.visad
Class DelaunayTest

java.lang.Object
  extended by hydroScalingAPI.examples.visad.DelaunayTest

public class DelaunayTest
extends java.lang.Object

DelaunayTest provides a graphical demonstration of implemented Delaunay triangulation algorithms, in 2-D or 3-D.


Field Summary
static int BOXES
           
static int CLARKSON
           
static int FAST
           
static int NONE
           
static int TRIANGLES
           
static int VERTICES
           
static int WATSON
           
 
Constructor Summary
DelaunayTest()
           
 
Method Summary
static float[] intersection(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
           
static void main(java.lang.String[] argv)
          Run 'java DelaunayTest' for usage instructions
static visad.Delaunay makeTriang(float[][] samples, int type, int numpass, boolean test)
          Triangulates the given samples according to the specified algorithm.
static void sortTriangles(visad.Delaunay delaun, float[][] samples)
           
static void visTriang(visad.Delaunay delaun, float[][] samples, int labels)
          Displays the results for the given Delaunay triangulation of the specified samples in a window.
static void writeTriangulation(visad.Delaunay delaun, float[][] samples)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLARKSON

public static final int CLARKSON
See Also:
Constant Field Values

WATSON

public static final int WATSON
See Also:
Constant Field Values

FAST

public static final int FAST
See Also:
Constant Field Values

NONE

public static final int NONE
See Also:
Constant Field Values

BOXES

public static final int BOXES
See Also:
Constant Field Values

TRIANGLES

public static final int TRIANGLES
See Also:
Constant Field Values

VERTICES

public static final int VERTICES
See Also:
Constant Field Values
Constructor Detail

DelaunayTest

public DelaunayTest()
Method Detail

main

public static void main(java.lang.String[] argv)
                 throws visad.VisADException,
                        java.rmi.RemoteException
Run 'java DelaunayTest' for usage instructions

Throws:
visad.VisADException
java.rmi.RemoteException

makeTriang

public static visad.Delaunay makeTriang(float[][] samples,
                                        int type,
                                        int numpass,
                                        boolean test)
                                 throws visad.VisADException,
                                        java.rmi.RemoteException
Triangulates the given samples according to the specified algorithm.

Parameters:
type - One of CLARKSON, WATSON, FAST
numpass - Number of improvement passes
test - Whether to test the triangulation for errors
Throws:
visad.VisADException
java.rmi.RemoteException

visTriang

public static void visTriang(visad.Delaunay delaun,
                             float[][] samples,
                             int labels)
                      throws visad.VisADException,
                             java.rmi.RemoteException
Displays the results for the given Delaunay triangulation of the specified samples in a window.

Parameters:
delaun - The triangulation to visualize
samples - The samples corresponding to the triangulation
labels - One of NONE, BOXES, TRIANGLES, VERTICES
Throws:
visad.VisADException
java.rmi.RemoteException

intersection

public static float[] intersection(float x1,
                                   float y1,
                                   float x2,
                                   float y2,
                                   float x3,
                                   float y3,
                                   float x4,
                                   float y4)

sortTriangles

public static void sortTriangles(visad.Delaunay delaun,
                                 float[][] samples)

writeTriangulation

public static void writeTriangulation(visad.Delaunay delaun,
                                      float[][] samples)


CUENCAS was initially developed by Ricardo Mantilla at the University of Colorado under the supervision of Dr. Vijay K. Gupta. We wish to recognize the support from the National Science Fundation.