## 3 Computer Optics for Controlling the Irradiance, and Wavefront Spatial Distributions
Additional data related to the field, e.g., information on the intensity distribution that refers  
Figure 4: Geometry of the design problem of an optical element (**a**). Approximation of the circular area \(G\) and triangular area \(D\) by cells with equal streams (**b**) [103]. Figure 5: Geometric scheme of the freeform surface design [104]. to another cross-section of the field, are being collected [106]. The phase problem also includes inverse problems of diffraction theory aimed at calculating the phase function of optical elements that ensure the formation of certain light structures. If the phase function of the optical element is specified, then essentially it is always possible to solve the direct problem of wave diffraction on the optical element and obtain the field distribution in the region of interest. The inverse problem is more difficult to solve but once solved, in principle any arbitrary surface of the optical element can be calculated [107]. However, such a surface cannot be made using current state-of-the-art means [108]. The freeform optics for beam shaping were presented in [109] and used with the purpose of performing the specified laser exposure in [110]. The calculation of the irradiance distribution generated by a freeform surface is carried out using the pinhole approach, the diagram of which is shown in Figure 6. The freeform surface is represented by a set of holes, each of which generates an image of the source on the target plane. The resulting irradiance distribution is defined as a superposition of all source images. As shown in [111, 112], both the calculation and production of optical elements that form a complex narrow-angle light distribution using surfaces of total internal reflection are quite challenging tasks. Currently, there are no generally accepted methods for constructing a ray-tracing function for an arbitrary region. In addition, to create complex beam distributions, the inverse problem of surface definition often cannot be solved with the required accuracy due to violation of the integrability condition. Moreover, the reflecting surface is additionally smoothed by rational B-splines during the process of mirror fabrication [113]. According to [114, 115], after special corrective processing for adjusting the intensity, the \"peak-to-valley\" value (PV value) of freeform mirrors can reach from 500 nm to 1.5 \(\upmu\)m, which can reduce the quality of the shaped irradiance distribution. It should be noted that the PV value only compares two local points on the surface--the highest and lowest relative to the reference surface. Local artefacts on the surface can cause the 'peak-to-valley' value to be quite large and the optics may perform quite well. Nevertheless, the PV value is an established unit of measurement and is quite widely used to measure the surface accuracy of freeform optics [116, 117]. It is only in the case of significant local artefacts that an optical system with a higher PV-value may actually perform better than one with a lower PV value. The high monochromaticity and large coherence length of the laser beam allow for the use of diffractive freeform optics for its shaping [118, 119, 120]. The diffractive freeform optics ensure the rotation of the laser beam, its spatial phase modulation, and the redistribution of its power over the treatment zone, which has a predefined shape. Each of these computer optical elements are designed as a reflecting or transmitting plate. The micro-relief of  
Figure 6: Diagram of the pinhole approach used to calculate the irradiance distribution generated by a freeform surface [110]. its surface is determined by the desired shape of the treatment zone, the power density distribution, and the wavelength \(\lambda\) of the laser irradiation.