Documentation of 'jhplot.F3D' Java class.
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.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.
Serialized Form
• ### Constructor Summary

Constructors
Constructor and Description
`F3D(FProxy f)`
Initialize function from proxy.
`F3D(IFunction iname, double Xmin, double Xmax, double Ymin, double Ymax, double Zmin, double Zmax)`
Create a function in 3D from a AIDA IFunction.
`F3D(String name)`
Create a function in 3D for evaluation.
`F3D(String name, double Xmin, double Xmax, double Ymin, double Ymax, double Zmin, double Zmax)`
Build a 3D function.
`F3D(String name, IFunction iname, double Xmin, double Xmax, double Ymin, double Ymax, double Zmin, double Zmax)`
`F3D(String title, String name, double Xmin, double Xmax, double Ymin, double Ymax, double Zmin, double Zmax)`
Create a function in 3D.
`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.
• ### Method Summary

All Methods
Modifier and TypeMethod and Description
`void``doc()`
Show online documentation.
`double``eval(double x, double y, double z)`
Evaluate a function at a specific point in (x,y,z)
`FProxy``get()`
Get the proxy of this function used for serialization and non-graphical representations.
`IFunction``getIFunction()`
Get Jaida function
`double``getMaxX()`
Get Max value in X
`double``getMaxY()`
Get Max value in Y
`double``getMaxZ()`
Set Max value in Z
`double``getMinX()`
Get Min value in X
`double``getMinY()`
Get Min value in Y
`double``getMinZ()`
Get Min value in Z
`String``getName()`
Get the name of the function used for evaluation
`Expression``getParse()`
Return parsed functional expression.
`int``getPoints()`
Get the number of points for evaluation of a function
`String``getTitle()`
Get the title
`boolean``isParsed()`
If the function is parsed correctly, return true.
`boolean``parse()`
Parse the function.
`void``setMaxX(double max)`
Set Max value in X
`void``setMaxY(double max)`
Set Max value in Y
`void``setMaxZ(double max)`
Set Max value in Z
`void``setMinX(double min)`
Set Min in X
`void``setMinY(double min)`
Set Min value in Y
`void``setMinZ(double min)`
Set Min value in Z
`void``setName(String name)`
Sets a name of the function, i.e.
`void``setPar(String parameter, double value)`
Replace abstract parameter with the value (double).
`void``setPoints(int bins)`
Get the number of points
`void``setTitle(String title)`
Set a title
`String``toString()`
Get this function as a string.
• ### Methods inherited from class jhplot.DrawOptions

`copyLinePars, getBinWidth, getColor, getDrawOption, getDrawOptions, getFillColor, getLegend, getLineParm, getLineStyle, getNameX, getNameY, getNameZ, getPenWidth, getSymbol, getSymbolShape, getSymbolSize, getType, isBars, isErrX, isErrY, isFilled, printDrawOptions, printDrawOptions, setBars, setBinWidth, setColor, setDrawLine, setDrawLineKey, setDrawOption, setDrawSymbol, setErr, setErrAll, setErrColor, setErrColor, setErrColorX, setErrColorY, setErrFill, setErrFillColor, setErrFillColor, setErrSys, setErrSysFill, setErrSysFillColor, setErrSysFillColor, setErrSysX, setErrSysY, setErrTicSize, setErrX, setErrY, setFill, setFillColor, setFillColorTransparency, setGraphStyle, setLegend, setLineStyle, setNameX, setNameY, setNameZ, setPenDash, setPenDash, setPenWidth, setPenWidthErr, setPenWidthErrSys, setStyle, setSymbol, setSymbol, setSymbolSize, setType`
• ### Methods inherited from class jhplot.Plottable

`getLabelX, getLabelY, getLabelZ, is3D, set3D, setLabelX, setLabelY, setLabelZ`
• ### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`
• ### 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)
• #### setTitle

`public void setTitle(String title)`
Set a title
Overrides:
`setTitle` in class `DrawOptions`
Parameters:
`title` - Title
• #### getTitle

`public 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(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.7 © DataMelt by jWork.ORG