## 3 Computer Optics for Controlling the Irradiance, and Wavefront Spatial Distributions  
It is known that the exposure to laser irradiation is accompanied by heat and mass transfer processes, the development of which depends on the energy as well as spatial and temporal characteristics of the laser beam [79]. The aim of the beam of light shaping process  
Figure 1: Scheme of laser beam absorption and reflection (**a**) and model for calculating absorption of a rough surface of a metallic material (**b**) [78]. is the simultaneous control of both irradiance and wavefront spatial distributions when they can be shaped in an arbitrary manner [80,81]. For example, a beam shaper consisting of two plano-freeform lenses was developed in [80] (Figure 2): the first freeform lens produces an integrable ray mapping associated with the desired irradiance transformation, while the second lens is designed to adjust the wavefront. In classical optics, the problem of creating wavefronts of the desired shape is solved by using compensating lenses [36], which allow wavefronts to be obtained as second-order rotational surfaces. However, the creation of a compensation lens is a unique task for each type of wavefront. Aspherical wavefronts of higher orders, as well as fronts without circular symmetry, appear to be virtually impossible to be shaped by compensating lenses with an acceptable complexity in general. Therefore, digital holography techniques are actively used to solve the problems of forming complex wavefronts [82,83]. In [84,85], it was shown that it is possible to reduce the quantization errors when creating aspherical fronts using binary computer-generated holograms. However, in this case only a small part of the illuminating beam energy corresponding to the first order of diffraction is diffracted into the required wavefront; a large part of the hologram resolution elements goes to the transmission of the carrier spatial frequency, while the relative opening of the wavefront is limited by the overlap of higher diffraction orders. Several Refs. including [86, 87, 88, 89] have shown that special circular or ring diffraction gratings, also called diffractive axions, which have high energy efficiency not only for polyhedral, but also for binary or two-level versions, have advantages for creating axisymmetric aspherical wavefronts. Diffractive axions provide an opportunity to diminish such disadvantages as the dependence of the generated beam parameters on the particular optical element, the dependence of the intensity distribution of the output beam on the manufacturing quality of the element and the non-uniform axial distribution of the intensity [90]. Computer optics techniques are used to create such wavefronts of complex shape [91]. One of the main goals of computer optics is to extend the range of design elements of optical systems. In addition to conventional lenses, prisms and mirrors, computational and control systems can be used to create optical elements with broader functionality [92]. One of the representatives of computer optics is a thin phase hologram, which carries explicit information about the phase component of the target wave and reconstructs it when illuminated by the reference wave. By combining such correctors with conventional lenses, optical systems with low spherical aberrations and new optical properties can be developed [93,94]. It should be noted that optics is also used directly in computing, although the focus is on connecting components of computers, communication or more fundamental systems that have some optical functions or elements that enable optical pattern recognition, etc. Figure 2: Beam shaper for arbitrary input/output beams. The freeform surfaces perform irradiation conversion—the first freeform lens that on the left; wavefront correction—the second lens that on the right [80]. The developed components such as optical logic gates, optical switches and spatial light modulators created a good starting basis for the eventual design of optical computers.