CurveGenerator¶
-
MLModule
¶ genre Diagram
authors Tobias Block
,Bernd Merkel
package FMEstable/ReleaseMeVis
dll MLCurveUtils
definition MLCurveUtils.def see also CurveFilter
,SoDiagram2D
,CurveImport
keywords curve
,diagram
,generator
,base
,parser
Purpose¶
The module CurveGenerator
generates an output Curve given a function expression that describes the curve.
Usage¶
Give the function expression in the f(x) section, change constants if necessary and use SoDiagram2D to see the result curve.
Details¶
Internally the muparser (v 2.2.3) is used: http://muparser.beltoforion.de/
Functions
Name | Num. Args | Explanation |
---|---|---|
sin | 1 | sine function |
sin | 1 | sine function |
cos | 1 | cosine function |
tan | 1 | tangens function |
asin | 1 | arcus sine function |
acos | 1 | arcus cosine function |
atan | 1 | arcus tangens function |
sinh | 1 | hyperbolic sine function |
cosh | 1 | hyperbolic cosine |
tanh | 1 | hyperbolic tangens function |
asinh | 1 | hyperbolic arcus sine function |
acosh | 1 | hyperbolic arcus tangens function |
atanh | 1 | hyperbolic arcur tangens function |
log2 | 1 | logarithm to the base 2 |
log10 | 1 | logarithm to the base 10 |
log | 1 | logarithm to the base 10 |
ln | 1 | logarithm to base e (2.71828…) |
exp | 1 | e raised to the power of x |
sqrt | 1 | square root of a value |
sign | 1 | sign function -1 if x<0; 1 if x>0 |
rint | 1 | round to nearest integer |
abs | 1 | absolute value |
min | var. | min of all arguments |
max | var. | max of all arguments |
sum | var. | sum of all arguments |
avg | var. | mean value of all arguments |
Operators
Operator | Description | Priority |
---|---|---|
= | assignement | -1 |
&& | logical and | 1 |
|| | logical or | 2 |
<= | less or equal | 4 |
>= | greater or equal | 4 |
!= | not equal | 4 |
== | equal | 4 |
> | greater than | 4 |
< | less than | 4 |
+ | addition | 5 |
- | subtraction | 5 |
* | multiplication | 6 |
/ | division | 6 |
^ | raise x to the power of y | 7 |
Operator | Description | Remarks |
---|---|---|
?: | if then else operator | C++ style syntax |
Constants
Constant | Description |
---|---|
e, _e | Euler number |
log2e | log2(e) |
log10e | log10(e) |
ln2 | ln(2) |
ln10 | ln(10) |
pi, _pi | Pi |
half_pi | Pi * 0.5 |
Parameter Fields¶
Field Index¶
= (extValueA) : Double |
End : Double |
Ext Name G : String |
= (extValueB) : Double |
Error: : String |
Ext Name H : String |
= (extValueC) : Double |
Expression Comment : String |
f(x) = : String |
= (extValueD) : Double |
Ext Name A : String |
Name : String |
= (extValueE) : Double |
Ext Name B : String |
Number of Constants : Integer |
= (extValueF) : Double |
Ext Name C : String |
Number of Points : Integer |
= (extValueG) : Double |
Ext Name D : String |
Start : Double |
= (extValueH) : Double |
Ext Name E : String |
Step : Double |
Edit Constant Names : Bool |
Ext Name F : String |
Style : Integer |
Visible Fields¶
f(x) =¶
-
name:
expression
, type:
String
, default:
x^2+2*x
¶ Sets a string that describes the mathematical expression of the curve.
Step¶
-
name:
stepValue
, type:
Double
, default:
0.1
, minimum:
0.01
¶ Sets a step value in x-direction for function evaluation.
Error:¶
-
name:
errorText
, type:
String
¶ Shows an error message if the expression string could not be parsed correctly.