2.6.11  New Functions

Contrary to macros, which are evaluated at parse time but do not otherwise affect rendering, functions can be evaluated while rendering. This is used in objects that need a function to be evaluated while rendering, to determine the surface of these objects, the isosurface and parametric object. Additionally you may call these functions anywhere a Float Function is allowed, even during parsing.

Syntax :

#declare FUNCTION_IDENTIFIER = function { FLOAT } |
#declare FUNCTION_IDENTIFIER = function(IDENT_LIST) { FLOAT } |
#declare FUNCTION_IDENTIFIER = function { SPECIAL_FLOAT_FUNCTION } |
#declare VECTOR_IDENTIFIER = function { SPECIAL_VECTOR_FUNCTION } |
#declare COLOR_IDENTIFIER = function { SPECIAL_COLOR_FUNCTION } |

Several functions are pre-defined. These internal functions can only be accessed through the "functions.inc", so it should be included in your scene.