![]() |
v2.0
|
|
If a parametric curve is needed to describe the style template, create it using symbolic expressions, for example:
You can use basic mathematical operations, functions and constants to create a symbolic expression in Renga STDL.
Operations that can be performed on variables, constants, and functions in symbolic expressions:
Operation | Description |
---|---|
+ | addition |
- | subtraction |
* | multiplication |
/ | division |
^ | exponentiation |
- | unary minus |
Mathematical functions that can be used in symbolic expressions:
Function Name | Description |
---|---|
sin | sine with argument in radians |
cos | cosine with argument in radians |
tan | tangent with argument in radians |
sind | sine with argument in degrees |
cosd | cosine with argument in degrees |
tand | tangent with argument in degrees |
asin | arcsine with the result in radians |
acos | arccosine with the result in radians |
atan | arctangent with the result in radians |
asind | arcsine with the result in degrees |
acosd | arccosine with the result in degrees |
atand | arctangent with the result in degrees |
sqrt | square root |
exp | exponential |
ln | natural logarithm |
lg | decimal logarithm |
deg | function to convert radians to degrees |
rad | function to convert degrees to radians |
abs | absolute value |
In symbolic expressions, numbers can be represented as unnamed constants, specified as floating-point numbers (a sequence of digits separated by a dot), or as integers.
Symbolic expressions can also include the use of named constants:
Constant Name | Description |
---|---|
M_PI | π - the ratio of a circle's circumference to its diameter |
M_PI_2 | π / 2 |
M_PI_4 | π / 4 |
M_SQRT2 | √2 |
M_E | e – the base of the natural logarithm |
M_PHI | φ – the golden ratio |
M_RADDEG | 180 / π – conversion factor from radians to degrees |
M_DEGRAD | π / 180 – conversion factor from degrees to radians |
When creating symbolic expressions, the following limitations should be taken into account:
Because of these limitations, correct calculations for analytical expressions can only be performed for relatively simple mathematical expressions and functions. For example, calculating the value of sin(t)/t at zero can be inaccurate.