FunctionΒΆ
| Type: | string | 
|---|---|
| Range: | [] | 
| Default: | -/- | 
| Appearance: | simple | 
| Excludes: | Expression | 
| Requires: | Module | 
Used in combination with Module to specify the python function containing the height-profile of the texture.
In the most simple case a Python module is a .py-file which contains one or several python function definition. In this case the name of the module is simply the file name without its .py suffix. The parameter Function is used to pick out the desired function.
For given  and
 and  coordinates, the so specified Python function must return elongation in
 coordinates, the so specified Python function must return elongation in  direction of the height-profile. The function must accept a single argument which is a dictionary containing the parameters as defined by the Parameter sections. The following python script defines a Gaussian bump:
 direction of the height-profile. The function must accept a single argument which is a dictionary containing the parameters as defined by the Parameter sections. The following python script defines a Gaussian bump:
import math
def Gaussian(parameter):
  X = parameter['X'] # retrieving the position
  value=40*math.exp(-3e-3*X[0]*X[0]-3e-3*X[1]*X[1])
  return value
Note
The position  are implicitly inserted into the parameter dictionary with key
 are implicitly inserted into the parameter dictionary with key X.