Let's see some statistics: Collisions and free paths in a Sinai billiard

Поделиться
HTML-код
  • Опубликовано: 17 сен 2021
  • Several viewers have been asking for some statistics on Sinai billiards, so here is a first example. The bottom half of the simulation shows a type of Sinai billiard: a particle is moving at constant speed, and bouncing off 400 circular pegs, as well as the rectangular box containing the pegs. 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 32 collisions. The numbers at the bottom show the total number of collisions (pegs and outer rectangle), the maximal number of times a peg is hit, 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 right one 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. Note the interesting form of the histogram, showing several peaks: they are related to the different possible values of the distance between centers of pegs. The first peak is due to neighboring pegs, the second one to next-to-nearest neighbors, and so on.
    The mean free path is displayed at the top right. The scale is such that the rectangle has width 2, and length 6.6. The circles have radius 0.05, and their centers are at distance 0.1875.
    Render time: 12 minutes 30 seconds
    Music: Hungarian Rhapsody No. 2 by Franz Liszt
    Current version of the C code used to make these animations: github.com/nilsberglund-orlea...
    www.idpoisson.fr/berglund/sof...
    Some outreach articles on mathematics:
    images.math.cnrs.fr/_Berglund...
    (in French, some with a Spanish translation)
  • НаукаНаука

Комментарии • 77

  • @grindsaur
    @grindsaur 2 года назад +21

    Now, it would be interesting to compare this with the same experiment performed on a fully tiled toroidal geometry to see what effect the bounding box and the "missing" pegs have.

    • @NilsBerglund
      @NilsBerglund  2 года назад +6

      The distribution should be a bit "cleaner", indeed. That's why mathematicians like systems on a torus.

    • @debblez
      @debblez 2 года назад

      I was about to comment the same thing

    • @Sgrunterundt
      @Sgrunterundt 2 года назад

      Yeah! Let's get periodic boundary conditions.

  • @agenericaccount3935
    @agenericaccount3935 2 года назад +23

    Came for the things I don’t understand, staying for the music. You consistently nail it.
    Also, love the addition of some charting.

    • @NilsBerglund
      @NilsBerglund  2 года назад +2

      Great, thanks!

    • @ruolbu
      @ruolbu 2 года назад

      what are you not understanding with these Billard videos? maybe someone can help.

  • @mikip3242
    @mikip3242 2 года назад +4

    Amazing serendipity there at 09:09 when it starts bouncing wall to wall. I guess the free-path computed there is off the charts in the upper-right histogram

    • @fburton8
      @fburton8 2 года назад +1

      In time with the music too! :)

  • @FinetalPies
    @FinetalPies 2 года назад +4

    This one was real fun to watch, I'm hoping we get to see different behaviours from different peg patterns later

  • @MrPies32
    @MrPies32 2 года назад +1

    Congrats on your work with The Action Lab!!! I am so proud and happen to see you there!!!

    • @NilsBerglund
      @NilsBerglund  2 года назад +1

      Thanks! It's more like my video inspired theirs, but of course it's awesome nonetheless!

  • @ManOfTheWeek596
    @ManOfTheWeek596 2 года назад +4

    Why did the mean suddenly go down a bit at 10:35?

    • @NilsBerglund
      @NilsBerglund  2 года назад +2

      Probably a coding error - I used a finite range to compute the mean, which is slightly smaller than the maximal number of hits. Thanks for spotting that!

  • @jiataosu7846
    @jiataosu7846 2 года назад +2

    I've never heard his version of the Hungarian Rhapsody before, very cool

  • @BiologyTube
    @BiologyTube 2 года назад +1

    Oh man that was great. The free path distribution is way more interesting than I'd expected, although in retrospect it makes total sense. Looks like it could be modeled with a Dirac delta comb multiplied by a exponential decay, convolved with some underlying distribution that captures the shape of each mode. Really interesting to think about! Hits per peg is also really interesting, looks like maybe it's pretty close to a gamma distribution with a time-evolving parameter?

    • @NilsBerglund
      @NilsBerglund  2 года назад

      A first approximation of the hits per peg distribution would be Poisson. That is what you get if you assume that each peg is hit independently of all others, with a small probability, but a large number of trials. Using a random walk model may provide a more accurate description.
      The free path distribution should be directly related to the distribution of line segments connecting points on the rim of different pegs, without intersecting any other peg in between. I would expect a power-law decay rather than exponential.

    • @BiologyTube
      @BiologyTube 2 года назад

      @@NilsBerglund Yeah as I was thinking about it later I also realized it's probably power-law decay. Should it be related to the dimensionality of the lattice?

    • @NilsBerglund
      @NilsBerglund  2 года назад

      A rough approximation would be given by the angle under which you see an obstacle of fixed size at distance r. It goes like 1/r in dimension 2, and 1/(r*r) in dimension 3. So in dimension d, you would get r to the power -(d-1).

  • @fukuokainternationaldemocr1974
    @fukuokainternationaldemocr1974 2 года назад +1

    Outstanding! One of the best so far. Great choice of music too!

  • @antonhengst8667
    @antonhengst8667 2 года назад

    Very very cool!! As always, thank you so much

  • @Kram1032
    @Kram1032 2 года назад

    Since this is a regular grid, you could simulate a boundless version of this perfectly by looking at just a single rhombus with four pegs (effectively a single full peg) in the corners. It'd be interesting to see how these solutions, especially the mean free path would change if you did that. (I don't think you could explicitly count the pegs that way. Not easily without taking some extra data anyway. You'd have to keep track of how the ball crosses cell boundaries and how often it ends up in the same boundary)
    Also, you could do a montecarlo-style simulation spawning a particle randomly within the cell and assigning it a random initial direction, sampling many solutions at once. That would presumably change the mean free path a lot.
    And as additional data (perhaps instead of the peg collision histogram), a fourier transform of the mean free path would be interesting too, since clearly there is something periodic going on in it.

  • @DeadPool-fx3sq
    @DeadPool-fx3sq 2 года назад +1

    It's interesting to me how it starts as a power law distribution (I think thats what it's called, 1st is 1/1, 2nd is 1/2, 3-1/3, 4-1/4) and then morphs into a normal distribution

    • @azai.mp4
      @azai.mp4 2 года назад

      It's similar to a Poisson distribution: en.wikipedia.org/wiki/Poisson_distribution
      One example of a Poisson distribution they give on that page is the "number of meteorites greater than 1 meter in diameter that strike Earth in a year," which seems very fitting for this video. That one billiard ball is like a meteorite being passed between all the "planets".

  • @ruolbu
    @ruolbu 2 года назад +2

    now the really unexpected yet logical thing for me was the pattern in the right diagram. why is there a repeating pattern? well the pegs are in a repeating pattern.
    it's very rare and unstable for collisions to happen between directly neighbouring pegs. that's the first bit.
    hitting one peg, flying inbetween two neighbouring pegs and hitting the first peg afterwards is the first spike.
    if that one is missed, there is a small dead zone where no other peg can be reached. So we get another valley. And so on and so on. Very cool to see.

    • @NilsBerglund
      @NilsBerglund  2 года назад +3

      Exactly. We will see in forthcoming simulations how different patterns of pegs change the free path distribution.

    • @ruolbu
      @ruolbu 2 года назад

      @@NilsBerglund Hits with the outer wall count as well, right? Do you think that these hits muddy the statistics by a lot? If so, is it feasible to place the outer wall so, that it intersects the outer most line of spheres in the middle? That way it would act like a mirror and basically reflect the ball the same way as if the pattern had continued, right? I think it would be necessary to disregard paths that connect to a wall or combine them into one single datapoint.

    • @NilsBerglund
      @NilsBerglund  2 года назад

      Yes, the outer wall makes a small contribution, you can see it for instance at the left of the first peak. If the pegs intersect the outer wall, I occasionally get a numerical problem causing the particle to get stuck in the corner. It's rare, but over many collisions it does happen. It might actually be easier to use periodic boundary conditions (pacman-style wrap-around walls).

    • @antonhengst8667
      @antonhengst8667 2 года назад

      Actually, because there's a minimum distance between pegs (the shortest possible path between immediate neighbors) you'd expect to not see anything before the first peak. I think when it bounces between the ones really close to the wall in the walls where you get that little bit of histogram well before the first spike

  • @neil8247
    @neil8247 2 года назад

    Cool! At one point the mean histogram seemed to be doing double duty as a spectrum analyser for the music! 🙂🤘

  • @litostatico
    @litostatico 4 месяца назад

    It would be lovely to see some vibrations modelling phonons and other thermal fluctuations in the lattice. Cool so see that channels of free path give rise to several peaks of the mean free path! What about impurities? Very nice video, as always.

    • @NilsBerglund
      @NilsBerglund  4 месяца назад

      Thanks! There are a couple of simulations of phonons in molecular dynamics on this channel, see for instance
      ruclips.net/video/uxzIbKIBjPA/видео.html
      ruclips.net/video/QeqNnaAhJPo/видео.html

  • @niceroundtv
    @niceroundtv 2 года назад

    9:12 interesting timing with the music!

  • @debblez
    @debblez 2 года назад +1

    I think you should narrow the free path buckets a bit. it stabilizes almost immediately

    • @NilsBerglund
      @NilsBerglund  2 года назад

      Thanks, I'll try it in later simulations.

  • @devinfaux6987
    @devinfaux6987 2 года назад

    Okay, now a version where every peg makes a *ping* when hit

  • @adrien5568
    @adrien5568 2 года назад +3

    Interesting enough, the standard deviation for the number of hits per pegs seems to increase with time.

    • @NilsBerglund
      @NilsBerglund  2 года назад

      I'll have to think about whether one can understand this when approximating the motion of the particle by a true random walk. That kind of question may have been studied by random walk experts...

    • @Sgrunterundt
      @Sgrunterundt 2 года назад +3

      In the long run we'd expect a Poisson distribution (not in the short term though, since many pegs gets multiple hits while the ball is in the area), and yes the standard deviation should increase along with the mean.

  • @timmckeaveney4978
    @timmckeaveney4978 2 года назад +2

    Nice.
    I wonder if the Fibonacci spiral also has the distinctive peaks.

    • @NilsBerglund
      @NilsBerglund  2 года назад +1

      We will see more of these with different patterns. The differences in free path distributions are quite remarkable.

  • @belbyiva
    @belbyiva 2 года назад

    The second graph looks like illustration of assembly explanation of quantisation particles in periodic potential. Distance between picks are growing, as I understand it might be equidistant at spatial frequency space.

    • @wretlaw1203
      @wretlaw1203 2 года назад

      I like your funny words, magic man

    • @belbyiva
      @belbyiva 2 года назад

      @@wretlaw1203 does it look so weird?😅

  • @anjaney_007
    @anjaney_007 2 года назад +1

    *How do you make such **_cool_** animations* ? I mean which software do you use ? *Totally loving them* ! Shared with all my friends ❤️

    • @NilsBerglund
      @NilsBerglund  2 года назад

      Thanks for sharing them! There is a link to the C code in the description.

  • @andriypredmyrskyy7791
    @andriypredmyrskyy7791 2 года назад +1

    I'm interested in the "harmonic" nature of the free path histogram, and I wonder if different peg arrangements give different shapes. I'm wondering how much of it is caused by geometry (free path length as measured centrally from any one peg in the symmetrical arrangement).

    • @NilsBerglund
      @NilsBerglund  2 года назад +1

      Yes, the free path distribution depends very much on the arrangement of pegs. Basically it reflects the length distribution of line segments connecting two circles, without intersecting any other circle. See other simulations on this channel for other arrangements of pegs.

  • @el_titi
    @el_titi 2 года назад +1

    Thanks!! Il could be interesting to have a way longer version (or faster) to see if the curve is completely flatten. What does the seconde graph represent ?

    • @NilsBerglund
      @NilsBerglund  2 года назад +2

      The second histogram shows the distribution of distances traveled between collisions with the pegs or walls.

    • @Sgrunterundt
      @Sgrunterundt 2 года назад

      Neither curve will flatten. The first one will remain coarse because of the finite number of pins. To make that smooth you'd have to have a much larger area in the simulation.
      The second graph has bumbs because of the periodic nature of the lattice. It is a real effect that will remain even as N goes to infinity. It actually seems that this simulation is long enough that the true shape of that curve is quite well represented.

  • @fakestory1753
    @fakestory1753 2 года назад

    i would like to see the statistics of direction, counting how many hit on each direction, or counting time interval on each direction

    • @NilsBerglund
      @NilsBerglund  2 года назад

      I expect it to be quite uniform, but there might be some effect of the lattice, not sure.

  • @ruolbu
    @ruolbu 2 года назад +2

    9:10 are you kidding me xD
    there were a lot of long shots in this. sadly with a linear scale for distance they are hardly visible in the statistics.

    • @NilsBerglund
      @NilsBerglund  2 года назад +1

      Yeah, I also liked the bounces at 9:10 :D

    • @ruolbu
      @ruolbu 2 года назад +1

      @@NilsBerglund also the perfect bit of music for that bit

  • @phpn99
    @phpn99 2 года назад

    converging towards the Central Limit Theorem on the left histogram, but what about the periodic peaks on the right ? Something to do with the scale and tessellation of the billiard ?

    • @NilsBerglund
      @NilsBerglund  2 года назад +1

      They are directly related to distances between points at the circumference of different pegs.

  • @AtlasReburdened
    @AtlasReburdened 2 года назад

    9:09
    Nice.

  • @KitagumaIgen
    @KitagumaIgen 2 года назад

    Are the distribution of free-path exponential-like? For the peaks that is, as far as I recall from the simplistic collision-models for thin gases there the free path becomes entirely exponential...

    • @NilsBerglund
      @NilsBerglund  2 года назад +1

      I would rather expect a power-law decay. The amplitude of the peaks has to do with how many obstacles at a given distance (nearest neighbors, next-to-nearest neighbors, etc) you can hit by starting on a given obstacle.

  • @Onomnaf
    @Onomnaf 2 года назад

    Maybe it's due to my job where I work a lot with spectrum and temporel signal, but it seem that the free path diagram look like "harmonics" with logarithmic attenuation. I suppose that the pick are around N*(0.1875-2*0.5) ?
    I wonder what's appen if you do the same simulation with a biguest billard. I conjecture the we should see more "harmonics" appear, maibe more visible with a log scale.
    I suppose the harmonic around zone are gauss law looking ? Do you think it's possible to check that with a more precise samples ?
    And last : what should be the calculation time to verifie that hypothesis ? ;)

    • @NilsBerglund
      @NilsBerglund  2 года назад

      The free path distribution is directly related to the distribution of distances between points at the circumference of different pegs. So it is not exactly Gaussian I believe, but more related to the geometry. For a long enough simulation, one should see more peaks on a log scale, but the probability of the particle getting stuck due to round-off errors increases.

  • @innokentiyromanchenko1450
    @innokentiyromanchenko1450 2 года назад

    Is it more peaks on mean free plot in log scale?

    • @NilsBerglund
      @NilsBerglund  2 года назад

      Probably, but the finite sample size will make them less accurate the further you go.

  • @rushabhdayannavar3675
    @rushabhdayannavar3675 2 года назад

    That is why the mean curve is bell 🔔 shaped

  • @drmathochist06
    @drmathochist06 2 года назад

    Shouldn't the mean of collisions per peg always be the total number of collisions divided by the (constant) number of pegs? How does it decrease sometimes?

    • @NilsBerglund
      @NilsBerglund  2 года назад

      The difference comes from the fact that collisions with the outer rectangle are also counted in the total number of collisions. The slight decrease of the mean near the end is due to the fact that I used a too small window to compute it.

  • @antonhengst8667
    @antonhengst8667 2 года назад +1

    I'm guessing the multimodality of the mean free path is clustered around the minimum distance between 1/2/3 etc nodes in the grid?

    • @antonhengst8667
      @antonhengst8667 2 года назад

      I wonder..... If you characterize a pattern of obstacles by that distribution as the number of collisions within the billboard goes to infinity.... Perhaps those distributions which have a broader, smooth or distribution will be better at absorbing energy ala your mangrove forests?

    • @antonhengst8667
      @antonhengst8667 2 года назад

      Unrelated to the above comment, pretty interesting / odd to me that we don't seem to follow a power law distribution, instead they seem to fall off really fast after three nodes away

    • @antonhengst8667
      @antonhengst8667 2 года назад

      You think that it wouldn't be so improbable to hit the 4th peg away, nor the 5th. Rare, sure, but not impossible as it looks to be in that histogram. That's very odd to me, especially as we saw the ball traveling very long distances between the lattice in certain circumstances

    • @antonhengst8667
      @antonhengst8667 2 года назад

      Indeed, if you think of it in terms of minutes of angle from the surface of a peg where the ball just collided... I really think it should follow a power law series or at least a harmonic one? Each subsequent peg as you go down an aisle occupies a small but not vanishingly small amount of angle, assuming a randomly oriented bounce

    • @antonhengst8667
      @antonhengst8667 2 года назад

      The fact that you Don't see the fourth fifth or 6th spike seems very very strange to me