Shining a rotating laser beam into a maze with mirrored walls
Channel: Nils Berglund
Date: 10/10/2022

In this variant of the video https://youtu.be/Ski3UOUtIdA , we use again laser beams to solve a maze with perfectly reflecting walls. However, instead of shooting 1000 beams at once, there is only one very thin beam, whose starting angles changes very slowly over time. The numbers at the right give the number of bounces the beam makes until it leaves the maze, or until it bounces 10 000 times, whichever happens first, and the angle of the beam with respect to the horizontal. The rotation of the laser slows down when the number of bounces increases, so you have a chance to pause the video if you want to look at long trajectories in detail. The graph shows the number of bounces as a function of the angle. 
Having coded a maze for the simulations https://youtu.be/FfnMaQF_2m8 and https://youtu.be/iBmmS4bgJcQ , it seemed only natural to use this feature with my billiard code as well. The above videos were 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. In my versions, the particles interacted with a Lennard-Jones potential, instead of performing independent random motions.
This version involves neither interaction, nor randomness: there is only one beam or particle at each time, and it follows perfectly straight lines between reflections on the wall of the maze. The path shows a form of sensitive dependence on the initial angle, and only very few angles allow it to exit the maze on the other side. Nevertheless it seems possible, at least in theory, to solve such a maze by pointing a perfect non-dispersing laser beam at its walls, assuming they are perfectly reflecting, and slowly rotating the beam. In practice, unfortunately, dispersion will probably soon ruin the effect. 
Another question of interest is whether a maze is unilluminable, that is, whether some parts of it always remain dark. This simulation shows that this is not the case for the particular maze chosen here. It seems reasonable to assume that any maze with walls at right angles is illuminable, buy I don't know whether this has been proven. 

Render time: 5 minutes 6 seconds
Color scheme:  Plasma by Nathaniel J. Smith and Stefan van der Walt
https://github.com/BIDS/colormap

Music: Hand Balance Redux 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=USUAN1100370
Artist: http://incompetech.com/

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)