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

Class PgMapleLoader

  • All Implemented Interfaces:
    PgLoaderIf


    public final class PgMapleLoader
    extends PgAbstractLoader
    Loader for Maple plots which were exported from Maple using JavaViewLib or direct export techniques provides by Maple.

    This loader carefully reads most Maple graphics properties and converts them to JavaView equivalent representation.

    The MPL format supported by this loader work bi-directional and can, for example, be re-imported into Maple as Maple plot.

    Parsing of some properties like label fonts or axes tickmarks may not be implemented yet.

    Author:
    Konrad Polthier
    Version:
    19.07.12 4.10 revised (cb) Loading of new Maple features added (Matrix, new arguments, etc.).
    22.03.10, 4.00 revised (kp) Superclass changed to PgAbstractLoader.
    23.07.05, 3.00 revised (kp) New or improved implementation of color, lighting and other previously missing tokens.
    06.10.03, 2.25 revised (kp) Interface extended by isEnabledOptimization().
    19.04.03, 2.20 revised (kp) Interface extended by setGeometryOption().
    21.08.02, 2.10 revised (kp) New methods getGeometries/getAnimations of PgLoaderIf implemented.
    20.08.02, 2.00 revised (kp) Global revisions incorporating more display options.
    30.01.02, 1.70 revised (ur) Generate neighbourhood informations for meshes.
    23.09.01, 1.60 revised (kp) Implement PgLoaderIf extended with methods for display options.
    27.02.01, 1.20 revised (ur) Adapted to changes in PuDouble.parseDouble.
    24.08.00, 1.10 revised (kp) Animation added.
    21.08.00, 1.00 created (kp)
    • Constructor Detail

      • PgMapleLoader

        public PgMapleLoader()
    • Method Detail

      • read

        public static PgJvxSrc[] read(java.lang.String fileName)
        Read geometry file in Maple graphic file format.
        Author:
        Konrad Polthier
        Version:
        21.08.00, 1.00 revised (kp)
        21.08.00, 1.00 created (kp)
      • read

        public PgJvxSrc[] read(java.io.BufferedReader in)
        Read Maple graphics data.

        Alternatively, one may call load(BuffereredReader) followed by getGeometries() resp. getAnimations() to have a finer control about which information one wants to use from a source. For example, optional display information must be retrieve by a subsequent call getDisplayOption() if available.

        Specified by:
        read in interface PgLoaderIf
        Overrides:
        read in class PgAbstractLoader
        Parameters:
        in - BufferedReader to read textual data from.
        Returns:
        Array of JVX geometries.
        See Also:
        PgAbstractLoader.write(Writer, PgJvxSrc [])
        Version:
        05.06.04, 1.10 revised (kp) Use white background color until Maple specifies background color.
        21.08.00, 1.00 created (kp)
      • makePolygonColorsFromXYZ

        public static boolean makePolygonColorsFromXYZ(PgJvxSrc geom,
                                                       int dimCol,
                                                       PdVector[] bnd)
        Create color from the edge position within its bounding box which is interpreted as RGB cube. If dimension of vertices is smaller than three then only the first vertex components are used in the color computation.
        Author:
        Konrad Polthier
        Version:
        16.07.05, 2.00 created (kp) Copied from PgPolygonSet and adjusted.
        27.09.01, 1.10 revised (kp) Correct if vertex dimension larger than three.
        22.08.00, 1.00 created (kp)
      • makeEdgeColorsFromXYZ

        public static boolean makeEdgeColorsFromXYZ(PgJvxSrc geom,
                                                    int dimCol,
                                                    PdVector[] bnd)
        Create color from the edge position within its bounding box which is interpreted as RGB cube. If dimension of vertices is smaller than three then only the first vertex components are used in the color computation.
        Since:
        JavaView 2.69
        Author:
        Konrad Polthier
        Version:
        26.04.03, 1.00 created (kp)
      • makeVertexColorsFromXYZ

        public static boolean makeVertexColorsFromXYZ(PgJvxSrc geom,
                                                      int dimCol,
                                                      PdVector[] bnd)
        Create color from the edge position within its bounding box which is interpreted as RGB cube. If dimension of vertices is smaller than three then only the first vertex components are used in the color computation.
        Author:
        Konrad Polthier
        Version:
        16.07.05, 2.00 created (kp) Copied from PgPointSet and adjusted.
        27.09.01, 1.10 revised (kp) Correct if vertex dimension larger than three.
        22.08.00, 1.00 created (kp)
      • makeVertexColorsFromZ

        public static boolean makeVertexColorsFromZ(PgJvxSrc geom,
                                                    java.awt.Color colLow,
                                                    java.awt.Color colHigh,
                                                    PdVector[] bnd)
        Create color from the vertical z-height within its bounding box ranging from low blue to high red. If dimension of vertices is smaller than three then the highest vertex component are used instead of the z-component in the color computation.
        Author:
        Konrad Polthier
        Version:
        21.07.05, 2.00 created (kp) Copied from PgPointSet and adjusted.
        16.04.05, 1.20 revised (kp) Both colors flipped to better sync with Maple.
        27.09.01, 1.10 revised (kp) Correct if vertex dimension larger than three.
        22.08.00, 1.00 created (kp)
      • makeVertexColorsFromZHue

        public static boolean makeVertexColorsFromZHue(PgJvxSrc geom,
                                                       PdVector[] bnd)
        Create color from the vertical z-height within its bounding box ranging through hue rainbow. If dimension of vertices is smaller than three then the highest vertex component are used instead of the z-component in the color computation.
        Author:
        Konrad Polthier
        Version:
        21.07.05, 2.00 created (kp) Copied from PgPointSet and adjusted.
        17.04.05, 1.20 revised (kp) Expand color spectrum to [magenta,red] from [blue,red].
        27.09.01, 1.10 revised (kp) Correct if vertex dimension larger than three.
        22.08.00, 1.00 created (kp)
      • write

        public boolean write(java.io.Writer writer,
                             PgJvxSrc[] geomArr)
                      throws java.io.IOException
        Write an array of geometries into an output stream writer in Maple PLOT/PLOT3D file format, called MPL.

        Numbers with absolute value less than jv.vecmath.PuMath#EPS are shown as zero. This avoids the annoying fact that double precision numbers fill the whole text area hiding the exponent, which hides their small value.

        Specified by:
        write in interface PgLoaderIf
        Overrides:
        write in class PgAbstractLoader
        Parameters:
        writer - Write all data to this stream
        geomArr - Array with geometries to save
        Returns:
        true on success.
        Throws:
        java.io.IOException
        See Also:
        read(BufferedReader)
        Version:
        15.08.02, 2.00 revised (kp) Major revision.
        11.06.01, 1.25 revised (kp) Method no longer static.
        10.06.01, 1.20 revised (kp) Save array of geometries instead of single geometry.
        21.08.00, 1.00 created (kp)
"JavaView? v5.03.003"

"

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

Ads help maintain this website.