A Fresnel zone plate, in higher resolution
Channel: Nils Berglund
Date: 2022-02-27

This second simulation of a Fresnel zone plate uses a simulation grid with half the mesh size than the previous simulation https://youtu.be/vAW04doomcY and with a slightly smaller wavelength, therefore allowing to see more details in the diffraction pattern. 
Fresnel zone plates are devices with interesting optical properties, similar to lenses, but that use diffraction instead of refraction to get the desired effect. In this simulation, the lens approximately focuses an incoming linear wave to a point. Unlike for usual lenses the index of refraction of the zone plate is constant, equal to 1, but instead the transparency of the plate varies like [1 + cos(k r^2)]/2, where r is the distance to the center of the plate. It is also possible to replace the smoothly varying transparency by a transparency switching between two fixed values.  
The position of the focal point depends on the parameter k and on the wavelength of the incoming wave, see https://en.wikipedia.org/wiki/Zone_plate for more details. The transparency of the plate is controlled here by adding a dissipation term inside the plate, which varies according to the above function of the distance to the center.  
The simulation has two parts, showing respectively the amplitude of the wave, and the average energy from the beginning of the simulation, on a logarithmic scale: 
Wave amplitude: 0:00
Average wave energy (log scale): 1:01

Render time: 1 hour 26 minutes
Color scheme: Twilight by Bastian Bechtold
https://github.com/bastibe/twilight

Music: "Old Vienna" by Endless Love@Endless Love

See also https://images.math.cnrs.fr/Des-ondes-dans-mon-billard-partie-I.html for more explanations (in French) on  a few previous simulations of wave equations. 

The simulation solves the wave equation by discretization. The algorithm is adapted from the paper https://hplgit.github.io/fdm-book/doc/pub/wave/pdf/wave-4print.pdf 
C code: https://github.com/nilsberglund-orleans/YouTube-simulations
https://www.idpoisson.fr/berglund/software.html
Many thanks to my colleague Marco Mancini for helping me to accelerate my code!