## 3 Computer Optics for Controlling the Irradiance, and Wavefront Spatial Distributions
Photonics is a new and promising tool for the next generation of computing hardware, and advances in digital computers are allowing us to design, simulate and build a new class of photonic devices and systems with unique tasks [95]. The approach to the creation of computer optics elements is described in detail in [96]. An optical element that reflects or transmits irradiation is characterised by an amplitude-phase reflection or transmission function. This function is determined by the conditions of the wavefield conversion problem to be solved. For the simplest cases, its analytical expression can be known, e.g., the phase function of a spherical, parabolic or cylindrical lens. However, in more complex cases, computer calculations are needed to determine this characteristic of the optical element. In this case, a computer can be used to perform numerical calculations in order to solve both the explicit problems of determining the amplitude-phase function of the optical element being created and the inverse problems. Figure 3 shows the scheme of the focusing of a laser beam where the final geometry is represented on a plane with the complex amplitude \(F_{0}\) on the section \(\,\left|\,x\right|\,\leq d\) with a focal distance \(z=f\)[96]. The aperture of the optical element \(G\) is restricted by the curves \(v=g_{1}\left(u\right)\) and \(v=g_{2}\left(u\right)\) and by straight line segments \(u=a\) and \(u=b\). The function \(\mu\left(x,\varepsilon\right)\) that characterises the distribution of energy in the \(\varepsilon\)-vicinity of the focusing section is represented on the right [96]. In addition to digital holography [97], the digital processing of images or fields in optical systems [98; 99; 100], the creation of optical elements for the analysis and shaping of the beam mode composition [101], the main areas of computer optics include the creation of wavefront correctors and spatial filters for optical systems, as well as solving inverse problems of diffraction theory and creating beam shaping devices based on the obtained results [102]. Using the related concepts of wavefront, beams and illuminance, it is possible to formulate the problem in the framework of geometric optics. The approximation of geometric optics implies that the characteristic dimensions of the optical surfaces and distributions of the generated light are much larger than the wavelength of light. Similarly, in [103], the problem of designing optical surfaces forming an output beam with a flat wavefront perpendicular to the \(z\)-axis and a given irradiance distribution in a certain plane \(z=f_{0}\), situated after the optical element is solved. The beam is transformed by a refractive optical element that has two optical surfaces: \(f\) and \(g\). The geometric formulation of the design problem of the optical element is shown in Figure 4, where the points in regions \(G\) and \(D\) correspond to the centres of the equal stream cells with which they are approximated. Refractive optical elements that convert the circular section of the beam into beams of different shapes (rectangular, triangular, cruciform) with flat wavefronts were developed. Figure 3: Focusing scheme of a laser beam with a geometry represented in two dimensions [96]. In [104], a solution to the three-dimensional problem of collimated beamforming design with a single freeform surface was obtained. Figure 5 shows the geometrical scheme of the freeform surface design. The unit vectors are represented by: **I**--incident beam, O--output beam and **N**--normal on plane **P**. The results can be generalised to achieve a lighting design with multiple freeform surfaces. It is well known that the problem of determining the phase characteristics of light fields occurs in various studies devoted to optics [105]. Difficulties of directly measuring the phase transformation in the optical range cause an advance in solving the problems of reconstruction of the phase characteristics of light fields using the intensity characteristics.