API documentation of the 'jhplot.F3D' Java class
F3D
jhplot

Class F3D

F3D
jhplot

Class F3D

  • All Implemented Interfaces:
    Serializable


    public class F3Dextends 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.setFastMath(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(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(String title,           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(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(String title,           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(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)
      • 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(String name)
        Sets a name of the function, i.e. what will be used for evaluation
        Parameters:
        name - Name
      • getName

        public 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(String parameter,                   double value)
        Replace abstract parameter with the value (double). Case sensitive!
        Parameters:
        parameter - parameter name
        value - value to be inserted
      • toString

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

DMelt 2.0 © DataMelt by jWork.ORG