While in OSCAR, the function Add_Astigmatism() can add an extra sagitta distortion with a Zernike polynomial over a certain diameter, it is not always practical. Sometimes, it is simpler to define a surface with two perpendicular radii of curvature R_x and R_Y.
The solution described here was given to me by Jean-Yves Vinet (a big thank from all the OSCAR users). A 3D ellipsoid in a general manner could be defined as the surface following this equation:
\frac{x^2}{a^2} + \frac{y}{b^2} + \frac{z^2}{R^2} = 1
Isolating the z coordinate, the above equation could be written as:
z = \pm R \sqrt{1 – \frac{x^2}{a^2} – \frac{y^2}{b^2} }
For a surface tangential to the plan z = 0, we take:
z = R – R \sqrt{1 – \frac{x^2}{a^2} – \frac{y^2}{b^2} }
In case of astigmatic mirror with R_x and R_y, we can set:
R = \frac{1}{2}(R_x + R_y), a^2 = R R_x, b^2 = R R_y