jhplot
Class F3D
- java.lang.Object
-
- jhplot.Plottable
-
- jhplot.DrawOptions
-
- jhplot.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'
- 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
- See Also:
- 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(java.lang.String name)Create a function in 3D for evaluation.F3D(java.lang.String name, double Xmin, double Xmax, double Ymin, double Ymax, double Zmin, double Zmax)Build a 3D function.F3D(java.lang.String name, IFunction iname, double Xmin, double Xmax, double Ymin, double Ymax, double Zmin, double Zmax)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.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddoc()Show online documentation.doubleeval(double x, double y, double z)Evaluate a function at a specific point in (x,y,z)FProxyget()Get the proxy of this function used for serialization and non-graphical representations.IFunctiongetIFunction()Get Jaida functiondoublegetMaxX()Get Max value in XdoublegetMaxY()Get Max value in YdoublegetMaxZ()Set Max value in ZdoublegetMinX()Get Min value in XdoublegetMinY()Get Min value in YdoublegetMinZ()Get Min value in Zjava.lang.StringgetName()Get the name of the function used for evaluationExpressiongetParse()Return parsed functional expression.intgetPoints()Get the number of points for evaluation of a functionjava.lang.StringgetTitle()Get the titlebooleanisParsed()If the function is parsed correctly, return true.booleanparse()Parse the function.voidsetMaxX(double max)Set Max value in XvoidsetMaxY(double max)Set Max value in YvoidsetMaxZ(double max)Set Max value in ZvoidsetMinX(double min)Set Min in XvoidsetMinY(double min)Set Min value in YvoidsetMinZ(double min)Set Min value in ZvoidsetName(java.lang.String name)Sets a name of the function, i.e.voidsetPar(java.lang.String parameter, double value)Replace abstract parameter with the value (double).voidsetPoints(int bins)Get the number of pointsvoidsetTitle(java.lang.String title)Set a titlejava.lang.StringtoString()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
-
-
-
-
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'
- 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
-
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'
- 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 XXmax- Max value in XYmin- Min value in YYmax- Max value in YZmin- Min value in ZZmax- 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- titlename- String representing the function.iname- input AIDA functionXmin- Min value in XXmax- Max value in XYmin- Min value in YYmax- Max value in YZmin- Min value in ZZmax- 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 functionXmin- Min value in XXmax- Max value in XYmin- Min value in YYmax- Max value in YZmin- Min value in ZZmax- 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 evaluationy- value in y for evaluationz- value in z for evaluation- Returns:
- function value at (x,y,z)
-
setTitle
public void setTitle(java.lang.String title)
Set a title- Overrides:
setTitlein classDrawOptions- Parameters:
title- Title
-
getTitle
public java.lang.String getTitle()
Get the title- Overrides:
getTitlein classDrawOptions- 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 namevalue- value to be inserted
-
toString
public java.lang.String toString()
Get this function as a string.- Overrides:
toStringin classjava.lang.Object- Returns:
- Convert to string.
-
-
DMelt 3.0 © DataMelt by jWork.ORG