Everything is illuminable (well, almost, in a closed maze with right angles)
Channel: Nils Berglund
Date: 2023-04-14

In this simulation, 50000 particles explore a maze of size 18 by 18 with no exits. The particles perform elastic collisions with the walls of the maze. Each cell of the maze containing at least one particle is colored with a hue related to the logarithm of the number of particles in the cell, averaged from the beginning of the simulation. If a cell contains more than 50 particles, only 50 particles are shown. Notice the diagonal bars moving in the blue region: These are particles moving at an angle close to 45 degrees, and tend to stay together for a long time span, because they make the same reflections off the walls for a while. 
 One expects that given enough time, the particles will spread evenly over the maze. A result that suggests that this may be true is a theorem by Samuel Lelièvre, Thierry Monteil and Barak Weiss, which builds on results by Alex Eskin, Maryam Mirzakhani, and Amir Mohammadi (see below). The theorem states that billiards in polygons with rational angles have at most a finite number of points that cannot be illuminated from any given point. Mixing is a stronger requirement, but the illumination property is necessary for it to hold. 
The video contains an animation of the particles, followed by a still frame of the final distribution:
Animation: 0:00
Final distribution: 0:51
The videos in this series are inspired by the Numberphile video https://youtu.be/BvwgdrC8vlE in which Matt Henderson shows "The Dumbest Way To Solve A Maze", by using particles that explore the maze at random. In Matt's simulations, the particles exploring the maze do not interact. They change direction at random, or whenever they approach a wall of the maze. This version involves no randomness: the motion is completely determined by the initial angle of the particle. 

Render time: 5 minutes 49 seconds
Color scheme: Viridis by Nathaniel J. Smith, Stefan van der Walt and Eric Firing
https://github.com/BIDS/colormap

Music: Corncob - Country by Kevin MacLeod is licensed under a Creative Commons Attribution 4.0 licence. https://creativecommons.org/licenses/by/4.0/
Source: http://incompetech.com/music/royalty-free/index.html?isrc=USUAN1100565
Artist: http://incompetech.com/

References: 
Samuel Lelièvre, Thierry Monteil and Barak Weiss, "Everything is illuminated",  Geom. Topol. 20 (2016) 1737-1762 
https://doi.org/10.48550/arXiv.1407.2975
https://arxiv.org/abs/1407.2975

Alex Eskin, Maryam Mirzakhani and Amir Mohammadi, "Isolation, equidistribution, and orbit closures for the SL(2,R) action on Moduli space", Annals of Math. 182 (2015), 673-721
https://doi.org/10.4007/annals.2015.182.2.7 
https://doi.org/10.48550/arXiv.1305.3015

Current version of the C code used to make these animations: 
https://github.com/nilsberglund-orleans/YouTube-simulations
https://www.idpoisson.fr/berglund/software.html

Some outreach articles on mathematics:
https://images.math.cnrs.fr/_Berglund-Nils-1343_.html
(in French, some with a Spanish translation)