Documentation of 'jhplot.HPlot3DP' Java class.
HPlot3DP
jhplot

Class HPlot3DP

  • All Implemented Interfaces:
    java.awt.event.ComponentListener, java.io.Serializable, java.util.EventListener


    public class HPlot3DP
    extends GHFrame
    Create a frame for showing 3D parametric functions.
    See Also:
    Serialized Form
    • Field Detail

      • set

        public boolean set
    • Constructor Detail

      • HPlot3DP

        public HPlot3DP(java.lang.String title,
                        int xsize,
                        int ysize,
                        int n1,
                        int n2,
                        boolean set)
        Create a canvas with several plots showing 3D function
        Parameters:
        title - Title
        xsize - size in x direction
        ysize - size in y direction
        n1 - number of plots/graphs in x
        n2 - number of plots/graphs in y
        set - set or not the graph
      • HPlot3DP

        public HPlot3DP(java.lang.String title,
                        int xs,
                        int ys)
        Construct a canvas with a single plot/graph
        Parameters:
        title - Title for the canvas
        xs - size in x
        ys - size in y
      • HPlot3DP

        public HPlot3DP(java.lang.String title,
                        int xs,
                        int ys,
                        int n1,
                        int n2)
        Construct a canvas with plots/graphs
        Parameters:
        title - Title for the canvas
        xs - size in x
        ys - size in y
        n1 - number of plots/graphs in x
        n2 - number of plots/graphs in y
      • HPlot3DP

        public HPlot3DP(java.lang.String title)
        Construct a canvas with a plot with the default parameters 600 by 400, and 10% space for the global title
        Parameters:
        title - Title
      • HPlot3DP

        public HPlot3DP()
        Construct a canvas with a plot with the default parameters 600 by 400, and 10% space for the global title "Default"
    • Method Detail

      • visible

        public void visible(boolean vs)
        Set the canvas frame visible or not
        Parameters:
        vs - (boolean) true: visible, false: not visible
      • visible

        public void visible(int posX,
                            int posY)
        Set the canvas frame visible. Also set its location.
        Parameters:
        posX - - the x-coordinate of the new location's top-left corner in the parent's coordinate space;
        posY - - he y-coordinate of the new location's top-left corner in the parent's coordinate space
      • visible

        public void visible()
        Set the canvas frame visible
      • destroy

        public void destroy()
        Destroy the canvas frame
      • resizePad

        public void resizePad(double widthScale,
                              double heightScale)
        Resize the current pad. It calculates the original pad sizes, and then scale it by a given factor. In this case, the pad sizes can be different.
        Parameters:
        widthScale - scale factor applied to the width of the current pad
        heightScale - scale factor applied the height of the current pad.
      • update

        public void update()
        Just update the current plot selected using cd() method
      • updateAll

        public void updateAll()
        Refresh all the plots on the same canvas HPLOT
      • clear

        public void clear()
        Clear the current graph including graph settings. Note: the current graph is set by the cd() method
      • clear

        public void clear(int i1,
                          int i2)
        Clear the graph characterized by an index in X and Y. This method cleans the data and all graph settings.
        Parameters:
        i1 - location of the graph in X
        i2 - location of the graph in Y
      • draw

        public void draw(FPR h)
        Draw a parametric function.
        Parameters:
        h -
      • draw

        public void draw(FPR[] f)
        Draw array of functions
        Parameters:
        f - array of functions
      • setRangeX

        public void setRangeX(double min,
                              double max)
        Set range for X axis
        Parameters:
        min - min value
        max - max value
      • setRangeY

        public void setRangeY(double min,
                              double max)
        Set range for Y
        Parameters:
        min - min value
        max - max value
      • setRangeZ

        public void setRangeZ(double min,
                              double max)
        Set range for Z
        Parameters:
        min - min value
        max - max value
      • setFov

        public void setFov(double factor)
        Set field of vision
        Parameters:
        factor - factor
      • getFov

        public double getFov()
        Get field of vision
        Returns:
        factor
      • setBackgColor

        public void setBackgColor(java.awt.Color c)
        Set background for current pad
        Parameters:
        c - color
      • setEyePosition

        public void setEyePosition(double x,
                                   double y,
                                   double z)
        Set position oy eye
        Parameters:
        x -
        y -
        z -
      • setAxisArrows

        public void setAxisArrows(boolean showArrows)
        Set or not arrows for axis
        Parameters:
        showArrows - true if shown
      • getEyePosition

        public double[] getEyePosition()
        Get a vector with eye position
        Returns:
        array with positions
      • getCameraPosition

        public double getCameraPosition()
        Get camera position. It is 0 by deafult. Negative value means sooming out, positive is zooming in.
        Returns:
        camera position. Position: zooming in
      • setCameraPosition

        public void setCameraPosition(double d)
        Set camera position
        Parameters:
        d - set camera position
      • setFog

        public void setFog(boolean fogEnabled)
        Set fog for objects
        Parameters:
        fogEnabled -
      • setAxes

        public void setAxes(boolean bShowAxes)
        Set all axes or not
        Parameters:
        bShowAxes - true if shown
      • setNameX

        public void setNameX(java.lang.String name)
        Set a name for X axis
        Parameters:
        name - Name of the label for X
      • setNameY

        public void setNameY(java.lang.String name)
        Set a name for Y axis
        Parameters:
        name - Name of the label for Y
      • setNameZ

        public void setNameZ(java.lang.String name)
        Set a name for Z axis
        Parameters:
        name - Name of the label for Y
      • setLabelFont

        public void setLabelFont(java.awt.Font font)
        Set Font for the labels
        Parameters:
        font - Font
      • setLabelColor

        public void setLabelColor(java.awt.Color color)
        Set Color for the labels
        Parameters:
        color - Color
      • setAxesColor

        public void setAxesColor(java.awt.Color c)
        Set Color for axes
        Parameters:
        color - Color
      • setFontValue

        public void setFontValue(java.awt.Font font)
        Set Font for axis numbers
        Parameters:
        font - Font
      • setAxes

        public void setAxes(boolean axisX,
                            boolean axisY,
                            boolean axisZ)
        Show or not axes for X, Y, Z
        Parameters:
        axisX -
        axisY -
        axisZ -
      • setAxesArrows

        public void setAxesArrows(boolean showArrows)
        Show or not small arrows on axes
        Parameters:
        showArrows - set true if arrows are shown (default)
      • clearAll

        public void clearAll()
        Clear all graphs from data and settings.
      • close

        public void close()
        Close the canvas (and dispose all components) Note: a memory leak is found - no time to study it. set to null all the stuff
      • quit

        public void quit()
      • doc

        public void doc()
        Show online documentation.

DMelt 3.0 © DataMelt by jWork.ORG