This dialog lets you to make your custom function to use inside other functions or other parts of explicit presentation. Writing the function source in Mathsurf is very similar to creating functions in max script. All you need to do is add equations, loops, conditions or any kind of expression into the definition rollout in order you want to be compile with max-script handler.
For example the definition of dHelRad(a) in Max-script will be :
Function dHelRad a = (
Local result = 0;
Global helRad,AA
Local aux = 2*(helRad a);
If aux>0 do result=–AA*AA*sin(360.0*a/pi)/aux;
Return result;
)
As you can see, global variables are automatically being accessible inside the function you don’t need to use GLOBAL expression to make them available |