Statistics for a Sinai billiard on the torus with Poisson-distributed obstacles
Channel: Nils Berglund
Date: 21/10/2021

The video shows the motion of a particle bouncing off 349 obstacles distributed randomly according to a Poisson point process, in a rectangular domain with periodic boundary conditions. The Poisson point process is the most random distribution of points one can imagine, with each point being selected uniformly at random, independently of all other points. This is why some circles overlap. 
The bottom half of the simulation shows a particle moving at constant speed, and bouncing off the 349 circular pegs. Whenever it leaves the rectangular box, it returns through the opposite side (in other words, the boundary conditions are periodic, or the system has the topology of a torus). The scale is such that the rectangle has width 2, and length 7.621, and the pegs have radius 0.05. 
To help tracking the motion of the particle, the pegs change color when they are hit: they become red when they are hit for the first time, and then their hue changes gradually, becoming red again after 48 collisions. The numbers at the bottom show the total number of collisions (pegs and outer rectangle) and the number of pegs hit as least once.
The two histograms on top show two different statistics. The left one shows how many pegs have been hit once, twice, three times, and so on. The colors in the histogram correspond to the colors of the hit pegs. The right plot shows the distribution of distances traveled between collisions, also called free paths. The vertical scale changes in the course of time in such a way that the maximum of the histogram remains constant. 
For each of the statistics, the maximum value, mean value, and standard deviation (denoted stdv) are shown at the top right. The free path distribution should approach an exponential distribution, as shown in the article https://www.jstor.org/stable/3213273 This is highlighted by the fact that the mean and standard deviation of the free path distribution tend to be equal, as is the case of the exponential distribution. 

Render time: 9 minutes
Color scheme: HSLuv https://www.hsluv.org/

Music:  Intuit256 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=USUAN1100193
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)