The following macro will insert the REAY operands in the merit function editor and will then optimize the system. The macro can be downloaded from the zip file at the end of this article.



Save the included macro file Beam Homogenizer.ZPL from the last page of the article to your {rootZEMAX}/Macros folder.