Hi Tali,
Thanks for your post here!
When you mention wanting a 2D sag for the Binary 2 surface, which output are you specifically referring to? Are you using the macro provided at the article here which goes into the computation for the diffractive surface itself?
If so, we currently do not have any built-in tools which automatically compute the sag of the diffractive surface that Binary 2 describes. Our Surface Sag analysis will output only the raw shape defined by the sag equation for this surface, which does not physically model the 'step' surface causing the diffraction. That said, the Binary 2 is meant to model a rotationally-symmetric kinoform surface -- so, there might be a way to at least create that kind of data from within Matlab, though I don't really have a lot of experience with that kind of data post-processing. For some further information, you could refer to that article I linked to above and take a look at the ZPL code yourself and see if you can edit it to output 2D data rather than just the 1 dimensional data.
Please let us know if you have any further questions here!
~ Angel