Documentation of 'jv.geom.PgUtil' Java class
PgUtil ("JavaView Reference Manual")
"JavaView? v5.03.003"
jv.geom

Class PgUtil



  • public class PgUtil
    extends java.lang.Object
    Utility programs for geometry classes which operate on primitive data.
    Author:
    Konrad Polthier
    Version:
    06.10.03, 1.10 revised (kp) Superclass changed to java.lang.Object.
    10.09.98, 1.00 created (kp)
    • Constructor Detail

      • PgUtil

        public PgUtil()
    • Method Detail

      • triangulate

        public static PiVector[] triangulate(PdVector[] polygon,
                                             int numVertices)
        Triangulate a given simple closed, nearly planar polygon. It is assumed that the 0-th and (numVertices-1)-th vertex are connected by an additional edge which closes the given sequence of vertices.

        Method successively removes the vertex with the smallest interior angle. Method can handle non-convex polygons.

        Polygon may have vertices of arbitrary ambient dimension larger than one. First and last vertex are implicitly connected to obtain a closed polygon.

        ToDo: But until now it cannot handle situations where the edge introduced by removing a vertex intersects the polygon somewhere else. To solve this problem the above method checkTriangleCut must be employed.

        Parameters:
        polygon - Array with vertices described a closed polygon in R^n.
        numVertices - Number of used entries in vertex array.
        Since:
        JavaView 2.36
        Author:
        Konrad Polthier
        Version:
        07.11.02, 1.40 revised (ur) No decrementing the number of vertices in this method.
        04.09.02, 1.30 revised (kp) Include length of used part of array as argument.
        12.02.01, 1.20 revised (kp) Bugs removed in star-shaped polygons, argument orient removed.
        10.06.98, 1.10 revised (kp) rewritten for Java.
        10.06.90, 1.00 created (kp) original Fortran version "triplg.f".
      • triangulate

        public static PiVector[] triangulate(PdVector[] polygon)
        Deprecated. use triangulate(PdVector[], int)
        Triangulate a given simple closed, nearly planar polygon. Method successively removes the vertex with the smallest interior angle. Method can handle non-convex polygons.

        Polygon may have vertices of arbitrary ambient dimension larger than one. First and last vertex are implicitly connected to obtain a closed polygon.

        ToDo: But until now it cannot handle situations where the edge introduced by removing a vertex intersects the polygon somewhere else. To solve this problem the above method checkTriangleCut must be employed.

        Parameters:
        polygon - Array with vertices described a closed polygon in R^n.
        Author:
        Konrad Polthier
        Version:
        12.02.01, 1.20 revised (kp) Bugs removed in star-shaped polygons, argument orient removed.
        10.06.98, 1.10 revised (kp) rewritten for Java.
        10.06.90, 1.00 created (kp) original Fortran version "triplg.f".
"JavaView? v5.03.003"

"

The software JavaView? is copyright protected. All Rights Reserved.
"

Ads help maintain this website.