Functy uses the Symbolic library to allow functions to be interpreted algebraically. This means that functions are kept in the symbolic algebraic form throughout the process, right up until the function needs to be displayed on screen.
This provides a number of benefits, foremost of which is accuracy. For example, it means that the lighting normals for the function surfaces can be calculated at run-time by the shader pipeline based on the surface derivatives. This differs from normal rendering, which uses only an approximation based on the triangle mesh of a surface.
The functions that symbolic recognises are listed below.
Algebra
Unary functions
Name |
Symbol |
Example |
Negative |
- |
(-x) |
Cosec |
cosec |
cosec(x) |
Hyperbolic sin |
sinh |
sinh(x) |
Hyperbolic cos |
cosh |
cosh(x) |
Hyperbolic tan |
tanh |
tanh(x) |
Cosine |
cos |
cos(x) |
Sin |
sin |
sin(x) |
Tan |
tan |
tan(x) |
Sec |
sec |
sec(x) |
Cotangent |
cot |
cot(x) |
Arc sin |
asin |
asin(x) |
Arc cos |
acos |
acos(x) |
Arc tan |
atan |
atan(x) |
Natural log |
ln |
ln(x) |
Exponentiation |
exp |
exp(x) |
Absolute value |
abs |
abs(x) |
Binary functions
Name |
Symbol |
Example |
Power |
** |
x**y |
Addition |
+ |
(x + y) |
Subtraction |
- |
(x - y) |
Multiplication |
* |
(x * y) |
Integer divide |
DIV |
(x DIV y) |
Division |
/ |
(x / y) |
Remainder |
mod |
(x mod y) |
Comparison
Name |
Symbol |
Example |
Equality |
= |
(x = y) |
Inequality |
!= |
(x != y) |
Less than |
< |
(x < y) |
Less than of equal to |
<= |
(x <= y) |
Greater than |
> |
(x > y) |
Greater than or equal to |
>= |
(x >= y) |
Logic
Unary functions
Name |
Symbol |
Example |
Not |
~ |
(~x) |
Binary functions
Name |
Symbol |
Example |
And |
^ |
(x ^ y) |
Or |
v |
(x v y) |
Implies |
-> |
(x -> y) |
Bitwise
Binary functions
Name |
Symbol |
Example |
Bitwise or |
OR |
(x OR y) |
Bitwise and |
AND |
(x AND y) |
Mask/bitclear |
BIC |
(x BIC y) |
Exclusive or |
EOR |
(x EOR y) |