Documentation of 'jhplot.F3D' Java class.
F3D
jhplot

Class F3D

  • All Implemented Interfaces:
    java.io.Serializable


    public class F3D
    extends DrawOptions
    Create 3D function using 3 independent variables: x,y,z.

    One can enabled fast math calculation using @see jhplot.HParam. For example, setting jhplot.HParam.setMath(true) makes calculation of elementary functions a factot 4-5 faster than using the standard Java Math, with precision of E-14.

    Operators and functions

    the following operators are supported:

    • Addition: '2 + 2'
    • Subtraction: '2 - 2'
    • Multiplication: '2 * 2'
    • Division: '2 / 2'
    • Exponential: '2 ^ 2' or ** (raise to a power)
    • Unary Minus,Plus (Sign Operators): '+2 - (-2)'
    • Modulo: '2 % 2'
    the following functions are supported:
    • abs: absolute value
    • acos: arc cosine
    • asin: arc sine
    • atan: arc tangent
    • cbrt: cubic root
    • ceil: nearest upper integer
    • cos: cosine
    • cosh: hyperbolic cosine
    • exp: euler's number raised to the power (e^x)
    • floor: nearest lower integer
    • log: logarithmus naturalis (base e)
    • sin: sine
    • sinh: hyperbolic sine
    • sqrt: square root
    • tan: tangent
    • tanh: hyperbolic tangent
    It also recognizes the pi (or Pi) values.
    See Also:
    Serialized Form
    • Constructor Detail

      • F3D

        public F3D(java.lang.String name)
        Create a function in 3D for evaluation. The function may have up to 3 independent variables: x,y,z. This is unranged function. Operators and functions

        the following operators are supported:
        • Addition: '2 + 2'
        • Subtraction: '2 - 2'
        • Multiplication: '2 * 2'
        • Division: '2 / 2'
        • Exponential: '2 ^ 2' or ** (raise to a power)
        • Unary Minus,Plus (Sign Operators): '+2 - (-2)'
        • Modulo: '2 % 2'
        the following functions are supported:
        • abs: absolute value
        • acos: arc cosine
        • asin: arc sine
        • atan: arc tangent
        • cbrt: cubic root
        • ceil: nearest upper integer
        • cos: cosine
        • cosh: hyperbolic cosine
        • exp: euler's number raised to the power (e^x)
        • floor: nearest lower integer
        • log: logarithm natural (base e)
        • sin: sine
        • sinh: hyperbolic sine
        • sqrt: square root
        • tan: tangent
        • tanh: hyperbolic tangent
        It also recognizes the pi (or Pi) values;
        Parameters:
        name - String representing the function
      • F3D

        public F3D(java.lang.String title,
                   java.lang.String name,
                   double Xmin,
                   double Xmax,
                   double Ymin,
                   double Ymax,
                   double Zmin,
                   double Zmax)
        Create a function in 3D. Uses 500 points between min and max value for evaluation. The function may have up to 3 independent variables in it (x,y,z). This is ranged function. Operators and functions

        the following operators are supported:
        • Addition: '2 + 2'
        • Subtraction: '2 - 2'
        • Multiplication: '2 * 2'
        • Division: '2 / 2'
        • Exponential: '2 ^ 2' or ** (raise to a power)
        • Unary Minus,Plus (Sign Operators): '+2 - (-2)'
        • Modulo: '2 % 2'
        the following functions are supported:
        • abs: absolute value
        • acos: arc cosine
        • asin: arc sine
        • atan: arc tangent
        • cbrt: cubic root
        • ceil: nearest upper integer
        • cos: cosine
        • cosh: hyperbolic cosine
        • exp: euler's number raised to the power (e^x)
        • floor: nearest lower integer
        • log: logarithm natural (base e)
        • sin: sine
        • sinh: hyperbolic sine
        • sqrt: square root
        • tan: tangent
        • tanh: hyperbolic tangent
        Parameters:
        name - String representing the function.
        Xmin - Min value in X
        Xmax - Max value in X
        Ymin - Min value in Y
        Ymax - Max value in Y
        Zmin - Min value in Z
        Zmax - Max value in Y
      • F3D

        public F3D(java.lang.String name,
                   double Xmin,
                   double Xmax,
                   double Ymin,
                   double Ymax,
                   double Zmin,
                   double Zmax)
        Build a 3D function. Title set to its name. Ranged function.
        Parameters:
        name -
        Xmin -
        Xmax -
        Ymin -
        Ymax -
        Zmin -
        Zmax -
      • F3D

        public F3D(java.lang.String title,
                   java.lang.String name,
                   IFunction iname,
                   double Xmin,
                   double Xmax,
                   double Ymin,
                   double Ymax,
                   double Zmin,
                   double Zmax)
        Create a function in 3D from a AIDA IFunction.
        Parameters:
        title - title
        name - String representing the function.
        iname - input AIDA function
        Xmin - Min value in X
        Xmax - Max value in X
        Ymin - Min value in Y
        Ymax - Max value in Y
        Zmin - Min value in Z
        Zmax - Max value in Y
      • F3D

        public F3D(java.lang.String name,
                   IFunction iname,
                   double Xmin,
                   double Xmax,
                   double Ymin,
                   double Ymax,
                   double Zmin,
                   double Zmax)
      • F3D

        public F3D(FProxy f)
        Initialize function from proxy.
        Parameters:
        f -
      • F3D

        public F3D(IFunction iname,
                   double Xmin,
                   double Xmax,
                   double Ymin,
                   double Ymax,
                   double Zmin,
                   double Zmax)
        Create a function in 3D from a AIDA IFunction.
        Parameters:
        iname - input AIDA function
        Xmin - Min value in X
        Xmax - Max value in X
        Ymin - Min value in Y
        Ymax - Max value in Y
        Zmin - Min value in Z
        Zmax - Max value in Y
    • Method Detail

      • eval

        public double eval(double x,
                           double y,
                           double z)
        Evaluate a function at a specific point in (x,y,z)
        Parameters:
        x - value in x for evaluation
        y - value in y for evaluation
        z - value in z for evaluation
        Returns:
        function value at (x,y,z)
      • setTitle

        public void setTitle(java.lang.String title)
        Set a title
        Overrides:
        setTitle in class DrawOptions
        Parameters:
        title - Title
      • getTitle

        public java.lang.String getTitle()
        Get the title
        Overrides:
        getTitle in class DrawOptions
        Returns:
        Title
      • setMinX

        public void setMinX(double min)
        Set Min in X
        Parameters:
        min - Min value
      • getMinX

        public double getMinX()
        Get Min value in X
        Returns:
        Min value in X
      • setMinY

        public void setMinY(double min)
        Set Min value in Y
        Parameters:
        min - Min value in Y
      • setMinZ

        public void setMinZ(double min)
        Set Min value in Z
        Parameters:
        min - Min value in Z
      • getMinY

        public double getMinY()
        Get Min value in Y
        Returns:
        Min value in Y
      • getMinZ

        public double getMinZ()
        Get Min value in Z
        Parameters:
        Min - value in Z
      • setMaxX

        public void setMaxX(double max)
        Set Max value in X
        Parameters:
        max - Max value in X
      • doc

        public void doc()
        Show online documentation.
      • setMaxZ

        public void setMaxZ(double max)
        Set Max value in Z
        Parameters:
        max - Max value in Z
      • setName

        public void setName(java.lang.String name)
        Sets a name of the function, i.e. what will be used for evaluation
        Parameters:
        name - Name
      • getName

        public java.lang.String getName()
        Get the name of the function used for evaluation
        Returns:
        Name
      • getMaxX

        public double getMaxX()
        Get Max value in X
        Returns:
        Max value in X
      • getMaxZ

        public double getMaxZ()
        Set Max value in Z
        Returns:
        max Max value in Z
      • setMaxY

        public void setMaxY(double max)
        Set Max value in Y
        Parameters:
        max - Max value in Y
      • getMaxY

        public double getMaxY()
        Get Max value in Y
        Returns:
        Max value in Y
      • setPoints

        public void setPoints(int bins)
        Get the number of points
        Parameters:
        bins - Number of points
      • getPoints

        public int getPoints()
        Get the number of points for evaluation of a function
        Returns:
        Number of points
      • getParse

        public Expression getParse()
        Return parsed functional expression.
        Returns:
        function
      • parse

        public boolean parse()
        Parse the function.
        Returns:
        true if parsed without problems.
      • getIFunction

        public IFunction getIFunction()
        Get Jaida function
        Returns:
      • isParsed

        public boolean isParsed()
        If the function is parsed correctly, return true. Use this check before drawing it.
        Returns:
        true if parsed.
      • get

        public FProxy get()
        Get the proxy of this function used for serialization and non-graphical representations.
        Parameters:
        proxy - proxy of this function.
      • setPar

        public void setPar(java.lang.String parameter,
                           double value)
        Replace abstract parameter with the value (double). Case sensitive!
        Parameters:
        parameter - parameter name
        value - value to be inserted
      • toString

        public java.lang.String toString()
        Get this function as a string.
        Overrides:
        toString in class java.lang.Object
        Returns:
        Convert to string.

DMelt 3.0 © DataMelt by jWork.ORG