Torabi Architect.
Mathsurf Documents Dec 2008
arrowFunction Definitions Rollout.

Function definitions rollout:
This rollout contents all custom definitions needed in the process.
To add new function press "+" button button, the Function definition dialog appears.
To remove or move a function to new place use right click and choose delete or cut and paste.
To edit existing function, click on it.


Note 1: if you want to call a function inside another, put that function on top.

  Function Definition Rollout

 

 

arrowFunction Definition Dialog.

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

Function definition dialog

 

Function Name:
The Function Name is actually used to name a variable into which a value representing the function is placed. When you call a function by using its name, you are accessing its definition in a variable of that name. The scope of the function name variable which you have created in Mathsurf is global scope.


Function Variables : Positional parameters are defined with a simple name and must be separated by <space>.the  scope of these variable is local and they are only available inside the current function.

arrowAdd equation.  
arrowAdd loop.  
arrowAdd condition.  
arrowAdd Text.  

 

arrowFormoula Definition.
arrowPlug-in features.
arrowBack to Index
www.torabiarchitect.com