Documentation of 'visad.DelaunayCustom' Java class
DelaunayCustom
visad

Class DelaunayCustom

  • All Implemented Interfaces:
    java.io.Serializable


    public class DelaunayCustom
    extends Delaunay
    DelaunayCustom is a set of constructors to create an instance of Delaunay by passing in a pre-computed triangulation. DelaunayCustom is useful for creating instances of Delaunay that can be passed into IrregularSet. If you want to perform consistency checks on your triangulation, call Delaunay.test() on your DelaunayCustom object after it is constructed.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      DelaunayCustom(float[][] samples, int[][] tri)
      construct a Delaunay from point locations and a list of triangles; call finish_triang() to fill in helper arrays (vertices, walk and edges); copy arguments
      DelaunayCustom(float[][] samples, int[][] tri, int[][] vertices, int[][] walk, int[][] edges, int num_edges)
      construct a Delaunay from point locations, a list of triangles, and helper arrays (vertices, walk and edges); copy arguments
      DelaunayCustom(float[][] samples, int[][] tri, int[][] vertices, int[][] walk, int[][] edges, int num_edges, boolean copy)
      construct a Delaunay from point locations, a list of triangles, and helper arrays (vertices, walk and edges); copy arguments
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static boolean checkAndFixSelfIntersection(float[][] samples)
      determine if a closed path self-intersects, and remove consecutive identical points
      static boolean checkSelfIntersection(float[][] samples)
      determine if a closed path self-intersects
      static boolean checkSelfIntersection(Gridded2DSet set)
      determine if a closed path self-intersects
      static void clip(float[][] samples, int[][] tris, float xc, float yc, float v, float[][][] outs, int[][][] outt)
      clip the topology (samples, tris) against the half-plane xc * x + yc * y <= v and return the clipped topology
      static float computeArea(float[][] samples)
      compute the area inside a set of closed paths
      static float computeArea(Gridded2DSet set)
      compute the area inside a set of closed paths
      static float computeArea(UnionSet set)
      compute the area inside a set of closed paths
      static int[][] fill(float[][] samples)
      check that samples describes the boundary of a simply connected plane region; return a decomposition of that region into triangles whose vertices are all boundary points from samples; the trick is that the region may not be convex, but the triangles must all lie inside the region
      static Irregular2DSet fill(Gridded2DSet set)
      check that set describes the boundary of a simply connected plane region; return a decomposition of that region into triangles whose vertices are all boundary points from samples, as an Irregular2DSet
      static Irregular2DSet fill(UnionSet set)
      check that set describes the boundary of a simply connected plane region; return a decomposition of that region into triangles whose vertices are all boundary points from samples, as an Irregular2DSet
      static int[][] fillCheck(float[][] samples, boolean check)
      check that samples describes the boundary of a simply connected plane region; return a decomposition of that region into triangles whose vertices are all boundary points from samples; the trick is that the region may not be convex, but the triangles must all lie inside the region
      static Irregular2DSet fillCheck(Gridded2DSet set, boolean check)
      check that set describes the boundary of a simply connected plane region; return a decomposition of that region into triangles whose vertices are all boundary points from samples, as an Irregular2DSet
      static Irregular2DSet fillCheck(UnionSet set, boolean check)
      check that set describes the boundary of a simply connected plane region; return a decomposition of that region into triangles whose vertices are all boundary points from samples, as an Irregular2DSet
      static boolean inside(float[][] s, float x, float y)
      determine if a point is inside a closed path
      static float[][] link(float[][][] ss)
      link multiple paths into a single path; this assumes that the paths in ss don't intersect each other but does test for self-intersection by each path
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DelaunayCustom

        public DelaunayCustom(float[][] samples,
                              int[][] tri)
                       throws VisADException
        construct a Delaunay from point locations and a list of triangles; call finish_triang() to fill in helper arrays (vertices, walk and edges); copy arguments
        Parameters:
        samples - locations of points for topology - dimensioned float[dimension][number_of_points]
        tri - list of triangles - dimensioned int[ntris][dim + 1] tris values are indices into second index of samples
        Throws:
        VisADException - a VisAD error occurred
      • DelaunayCustom

        public DelaunayCustom(float[][] samples,
                              int[][] tri,
                              int[][] vertices,
                              int[][] walk,
                              int[][] edges,
                              int num_edges)
                       throws VisADException
        construct a Delaunay from point locations, a list of triangles, and helper arrays (vertices, walk and edges); copy arguments
        Parameters:
        samples - locations of points for topology - dimensioned float[dimension][number_of_points]
        tri - list of triangles - dimensioned int[ntris][dim + 1] tris values are indices into second index of samples
        vertices - links from vertices to triangles/tetrahedra - dimensioned int[number_of_points][nverts[i]]
        walk - links from triangles/tetrahedra to neighboring triangles/tetrahedra - dimensioned int[ntris][dim + 1]
        edges - links from tri/tetra edges to global edge numbers - dimensioned int[ntris][3 * (dim - 1)]
        num_edges - number of global edges
        Throws:
        VisADException - a VisAD error occurred
      • DelaunayCustom

        public DelaunayCustom(float[][] samples,
                              int[][] tri,
                              int[][] vertices,
                              int[][] walk,
                              int[][] edges,
                              int num_edges,
                              boolean copy)
                       throws VisADException
        construct a Delaunay from point locations, a list of triangles, and helper arrays (vertices, walk and edges); copy arguments
        Parameters:
        samples - locations of points for topology - dimensioned float[dimension][number_of_points]
        tri - list of triangles - dimensioned int[ntris][dim + 1] tris values are indices into second index of samples
        vertices - links from vertices to triangles/tetrahedra - dimensioned int[number_of_points][nverts[i]]
        walk - links from triangles/tetrahedra to neighboring triangles/tetrahedra - dimensioned int[ntris][dim + 1]
        edges - links from tri/tetra edges to global edge numbers - dimensioned int[ntris][3 * (dim - 1)]
        num_edges - number of global edges
        copy - flag indicating whether to copy arrays
        Throws:
        VisADException - a VisAD error occurred
    • Method Detail

      • checkSelfIntersection

        public static boolean checkSelfIntersection(Gridded2DSet set)
                                             throws VisADException
        determine if a closed path self-intersects
        Parameters:
        set - Gridded2DSet with manifold dimension = 1
        Returns:
        true if closed path in set self-intersects
        Throws:
        VisADException - a VisAD error occurred
      • checkSelfIntersection

        public static boolean checkSelfIntersection(float[][] samples)
                                             throws VisADException
        determine if a closed path self-intersects
        Parameters:
        samples - locations of points on closed path - dimensioned float[2][number_of_points]
        Returns:
        true if closed path in samples self-intersects
        Throws:
        VisADException - a VisAD error occurred
      • checkAndFixSelfIntersection

        public static boolean checkAndFixSelfIntersection(float[][] samples)
                                                   throws VisADException
        determine if a closed path self-intersects, and remove consecutive identical points
        Parameters:
        samples - locations of points on closed path - dimensioned float[2][number_of_points] - may be modified on return
        Returns:
        true if closed path in samples self-intersects
        Throws:
        VisADException - a VisAD error occurred
      • computeArea

        public static float computeArea(UnionSet set)
                                 throws VisADException
        compute the area inside a set of closed paths
        Parameters:
        set - UnionSet of Gridded2DSets with manifold dimension = 1, interpreted as a set of closed paths
        Returns:
        sum of areas inside closed paths
        Throws:
        VisADException - path self intersects or a VisAD error occurred
      • computeArea

        public static float computeArea(Gridded2DSet set)
                                 throws VisADException
        compute the area inside a set of closed paths
        Parameters:
        set - Gridded2DSet with manifold dimension = 1, interpreted as a closed path
        Returns:
        area inside closed path
        Throws:
        VisADException - path self intersects or a VisAD error occurred
      • computeArea

        public static float computeArea(float[][] samples)
                                 throws VisADException
        compute the area inside a set of closed paths
        Parameters:
        samples - locations of points on closed path - dimensioned float[2][number_of_points]
        Returns:
        area inside closed path
        Throws:
        VisADException - path self intersects or a VisAD error occurred
      • fill

        public static Irregular2DSet fill(Gridded2DSet set)
                                   throws VisADException
        check that set describes the boundary of a simply connected plane region; return a decomposition of that region into triangles whose vertices are all boundary points from samples, as an Irregular2DSet
        Parameters:
        set - Gridded2DSet with manifold dimension = 1, interpreted as a closed path boundary
        Returns:
        Irregular2DSet whose triangles form the interior of the region enclosed by set
        Throws:
        VisADException - path self intersects or a VisAD error occurred
      • fillCheck

        public static Irregular2DSet fillCheck(Gridded2DSet set,
                                               boolean check)
                                        throws VisADException
        check that set describes the boundary of a simply connected plane region; return a decomposition of that region into triangles whose vertices are all boundary points from samples, as an Irregular2DSet
        Parameters:
        set - Gridded2DSet with manifold dimension = 1, interpreted as a closed path boundary
        check - if true then throw a VisADException if path self- intersects, else just return null
        Returns:
        Irregular2DSet whose triangles form the interior of the region enclosed by set
        Throws:
        VisADException - path self intersects or a VisAD error occurred
      • fill

        public static int[][] fill(float[][] samples)
                            throws VisADException
        check that samples describes the boundary of a simply connected plane region; return a decomposition of that region into triangles whose vertices are all boundary points from samples; the trick is that the region may not be convex, but the triangles must all lie inside the region
        Parameters:
        samples - locations of points on closed path - dimensioned float[2][number_of_points]
        Returns:
        triangles that form the interior of the region enclosed by samples - dimensioned int[ntris][dim + 1]
        Throws:
        VisADException - path self intersects or a VisAD error occurred
      • fillCheck

        public static int[][] fillCheck(float[][] samples,
                                        boolean check)
                                 throws VisADException
        check that samples describes the boundary of a simply connected plane region; return a decomposition of that region into triangles whose vertices are all boundary points from samples; the trick is that the region may not be convex, but the triangles must all lie inside the region
        Parameters:
        samples - locations of points on closed path - dimensioned float[2][number_of_points]
        check - if true then throw a VisADException if path self- intersects, else just return null
        Returns:
        triangles that form the interior of the region enclosed by samples - dimensioned int[ntris][dim + 1]
        Throws:
        VisADException - path self intersects or a VisAD error occurred
      • fill

        public static Irregular2DSet fill(UnionSet set)
                                   throws VisADException
        check that set describes the boundary of a simply connected plane region; return a decomposition of that region into triangles whose vertices are all boundary points from samples, as an Irregular2DSet
        Parameters:
        set - UnionSet of Gridded2DSets with manifold dimension = 1, interpreted as a set of closed paths
        Returns:
        Irregular2DSet whose triangles form the interior of the region enclosed by set
        Throws:
        VisADException - path self intersects or a VisAD error occurred
      • fillCheck

        public static Irregular2DSet fillCheck(UnionSet set,
                                               boolean check)
                                        throws VisADException
        check that set describes the boundary of a simply connected plane region; return a decomposition of that region into triangles whose vertices are all boundary points from samples, as an Irregular2DSet
        Parameters:
        set - UnionSet of Gridded2DSets with manifold dimension = 1, interpreted as a set of closed paths
        check - if true then throw a VisADException if path self- intersects, else just return null
        Returns:
        Irregular2DSet whose triangles form the interior of the region enclosed by set
        Throws:
        VisADException - path self intersects or a VisAD error occurred
      • link

        public static float[][] link(float[][][] ss)
                              throws VisADException
        link multiple paths into a single path; this assumes that the paths in ss don't intersect each other but does test for self-intersection by each path
        Parameters:
        ss - a set of paths - dimensioned float[number_of_paths][2][number_of_points_for_path]
        Returns:
        a path dimensioned float [2][number_of_points]
        Throws:
        VisADException - a path self intersects or a VisAD error occurred
      • inside

        public static boolean inside(float[][] s,
                                     float x,
                                     float y)
                              throws VisADException
        determine if a point is inside a closed path
        Parameters:
        s - locations of points on closed path - dimensioned float[2][number_of_points]
        x - first coordinate of point
        y - second coordinate of point
        Returns:
        true if point (x, y) is inside the path s
        Throws:
        VisADException - a VisAD error occurred
      • clip

        public static void clip(float[][] samples,
                                int[][] tris,
                                float xc,
                                float yc,
                                float v,
                                float[][][] outs,
                                int[][][] outt)
                         throws VisADException
        clip the topology (samples, tris) against the half-plane xc * x + yc * y <= v and return the clipped topology
        Parameters:
        samples - locations of points for topology - dimensioned float[dimension][number_of_points]
        tris - list of triangles - dimensioned int[ntris][dim + 1] tris values are indices into second index of samples
        xc - x coefficient in half-plane inequality
        yc - y coefficient in half-plane inequality
        v - constant in half-plane inequality
        outs - array dimensioned float[1][][] to take samples of clipped topology - on output dimensioned float[1][2][number_of_output_samples]
        outt - array dimensioned int[1][][] to take tris of clipped topology - on output dimensioned int[1][number_of_output_triangles][3]
        Throws:
        VisADException - a VisAD error occurred

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.