Hi both.
Following up on this, I'm attaching an example similar to one we use in the Illumination and Stray Light course. It takes a circular beam from a Source Gaussian and reflects from an optimized Extended Polynomial to produce a good square distribution at a detector. If you look at the cross sections in X and Y you can see that they are very good in terms of flatness and of a sharp drop at the edges. The merit function, though, you can see is very long, and I built it using the Bitmap Optimization Wizard. This tool allows you to use a bitmap image target to shape the beam into, theoretically, as complex a pattern as you wish so long as you have enough of the right parameters to vary. In this case, it took six variables of the extended polynomial going out to the 27th term (They are X0Y2, X2Y0, X0Y4, X4Y0, X0Y6, X6Y0), but more complicated patterns will need more terms and possibly other surfaces. The Bitmap Wizard is, however, available for Premium licenses only. If you don't hold a Premium license but are interested in this, let us know, and we can put you in touch with your account manager to discuss how to get you access.