- Use arithmetic expressions anywhere numeric input items are expected.
- Have access to a broad range of lens parameter and performance data, which can be retrieved from the program's internal database and can be reused in arithmetic expressions.
- Access to the most common mathematical functions (sin, tan, cos, sinh, cosh, tanh, asin, acos, atan, sqrt, exp, log, log10, logn, besj0, besj1, besjn, abs, min, max, aint, anint)
- User-defined variables and functions
- Pass parameters to macros
- Include macros in other macro files and build complex tasks from elementary macros or commands.
- Loop constructs: DO - ENDDO and WHILE - ENDWHILE
- Conditional constructs: IF - ELSE - ELSEIF - ENDIF
- File and data handling: OPEN, CLOSE, READ, WRITE/PRINT

A macro is a sequence of OpTaliX commands, arithmetic expressions and database items stored in a file. Macro features can be used throughout the whole program, e.g. in the command line, in the definition of the optimization merit function and in user defined graphics. Macros can be run from either command or GUI mode.

The following examples indicate some of the macro capabilities, with increasing complexity from top to bottom. The macro "

In the sample command above, two parameters are passed to the macro. the macro may also executed (run) from the menu. Here are some commented sample entries in a macro file:

sin(r) |
sine of angle in radians |

cos(r) |
cosine of angle in radians |

tan(r) |
tangent of angle in radians |

exp(x) |
e^{x} |

log(x) |
natural logarithm |

log10(x) |
common logarithm |

logn(n,x) |
logarithm base n |

sqrt(x) |
square root |

acos(r) |
arccosine |

asin(r) |
arcsine |

atan(r) |
arctangent |

cosh(r) |
hyperbolic cosine |

sinh(r) |
hyperbolic sine |

tanh(r) |
hyperbolic tangent |

besj0(r) |
Bessel function 1^{st} kind, order 0 |

besj1(r) |
Bessel function 1^{st} kind, order 1 |

besjn(n,x) |
Bessel function 1^{st} kind, order n |

aint(x) |
truncate to a whole number |

anint(x) |
real representation of the nearest whole number |

abs(x) |
absolute value |

min(a,b) |
minimum value |

max(a,b) |
maximum value |

The macro capability in OpTaliX makes use of the Function Parser Module of Stuart Midgley.

- Non-Sequential
- Special Apertures
- Gradient Index
- Hologram
- Zoom
- Array Surfaces
- Fresnel Lens
- Light Pipe
- Global References
- Geometric Analysis
- Diffraction Analysis
- Interferogram
- Physical Optics (350kb)
- Fibers
- Optimization
- User Defined Graphics
- Glass Manager
- Coatings
- Macro Language
- ISO Element Drawing
- Surface Deformations
- Ghost Image Analysis
- Illumination