Creating Any Dimensional Physics simulation (PYTORCH)

Поделиться
HTML-код
  • Опубликовано: 16 ноя 2024

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

  • @maximood-tired
    @maximood-tired Год назад +5

    the multidimensional visualizations are really interesting, it really makes one think

  • @NikZapp
    @NikZapp Год назад +12

    I think the issue with galaxies not forming together is because the angular velocity of the whole particle system is zero at the start. Maybe randomizing their velocities at the start will solve it? Also, the weird clumping bug can be mitigated by sampling the forces acting on the particle not on the position it is currently in, but in the position its predicted to be in according to the previous velocity. Great video anyways!

    • @8AAFFF
      @8AAFFF  Год назад +5

      thanks, another reason for galaxies not forming might be because the "universe" is just way too small, so everything just collapses into the middle

    • @Pockeywn
      @Pockeywn Год назад +2

      oh shit we got galaxies almost forming? this video boutta be dope i love reading the comments first

  • @levibruner7553
    @levibruner7553 7 месяцев назад

    The reason for the "trails" might be gravity and the "dragging force" that was added forming a stable equilibrium which caused the particles to stay a certain distance apart. Really cool looking though.

  • @andybrice2711
    @andybrice2711 Год назад +3

    14:40 _"For some reason, the particles make this weird trail type thing."_ OH MY GOD YOU JUST REVIVED STRING THEORY

    • @8AAFFF
      @8AAFFF  Год назад +1

      the true string theory XD

    • @sifi3638
      @sifi3638 7 месяцев назад

      that is "string" (a "fiber") equivalent in higher dimensions

  • @catfan__
    @catfan__ 11 месяцев назад +2

    hey not sure if you know this but if you wanna add a more realistic bloom effect (like the one at the start) just duplicate the text, and put a massive gaussian blur on the background text

  • @fire17102
    @fire17102 Год назад

    Haha you have π thousand subscribers ❤
    All the best!

  • @8AAFFF
    @8AAFFF  Год назад +1

    few corrections:
    thanks to @TiagoTiagoT
    1: i made a mistake saying that its practically impossible to make a neural network be more optimized than traditional method.
    you can make it more optimized, by making the neural network predict multiple steps into the future, not just one (didn't occur to me for some reason)
    2: code for the simulation is wrong (problem, with a misplaced square root)

  • @bobert3417
    @bobert3417 11 месяцев назад

    Another interesting one!

  • @sippysop1571
    @sippysop1571 Год назад +1

    Love the edit, keep it up :)

  • @boshi3513
    @boshi3513 Год назад

    this is great, pytorch is so nice for any numerical calculation. a CUDA supported numpy…

    • @8AAFFF
      @8AAFFF  Год назад

      yes the pytorch thing worked out better than i thought

  • @tiagotiagot
    @tiagotiagot Год назад +1

    Maybe start with just two particles in 2d and figure out how to get the physics for orbits working that way, and once that works, increase the number of particles gradually to check if it still work with more particles, and once you got that working reasonably well, start adding dimensions?

    • @8AAFFF
      @8AAFFF  Год назад

      yeah i started to try figuring out how to make galaxies work in 2 dimensions, and just could not get it to work, so I just went on to add the multiple dimensions.

    • @tiagotiagot
      @tiagotiagot Год назад +1

      @@8AAFFF I'm still not sure if it's enough (or even a move in the right direction), but playing with your code a bit, looks like you left out the squareroot part of the distance formula; and the drag you had there is way too high; and I suspect big_G is also way too high.
      As for the neural physics part of the project; I haven't looked into the code yet, but your comment about optimization in the video missed something important; in theory, it should be possible to train the neural network to predict the position many steps in the future without calculating the intermediary steps. I imagine the way you would do that, would be to keep a certain number of the most recent steps of the history, and have the neural network predict a random number of steps into the future (or past, since other than drag, physics should be time-symmetrical); that way, when using it for inference you can specify how many steps you want it to skip (perhaps even more steps than you trained it to predict, though the results would probably start to get wronger the further from the trained range you get.), having time-span between the input world and the output world as an extra input to the neural network.

    • @8AAFFF
      @8AAFFF  Год назад +1

      @@tiagotiagot damn predicting multiple steps into the future just completely did not occur to me.
      yes now that i think about it it is definitely possible to make a neural network more optimized than the normal method (thanks for pointing it out)
      and about the (most likely) mistakes in the simulation: i very well might have missed some important equation / mistake, if you can get it to run properly (maybe even with real life parameters) then please make a pull request i will happily update the git repo :D

    • @tiagotiagot
      @tiagotiagot Год назад +1

      @@8AAFFF Ugh, sorry, I just came back to mess with the code a little more before going to sleep and I realized why the squareroot is missing. There's no point in having a squareroot in the distance formula because in the gravity formula you would be using the square of the distance...

    • @8AAFFF
      @8AAFFF  Год назад

      @@tiagotiagot thanks for pointing that out, at this point im soo done with this project that i probably wont come back to fix it but i will update the pinnd comment, again thanks for putting so much effort into figuring out the problem :D

  • @rainy4226
    @rainy4226 Год назад

    Nice

  • @fortaber
    @fortaber 11 месяцев назад

    Can you tell where are you from? I think i hear russian accent (im Russian)

    • @8AAFFF
      @8AAFFF  11 месяцев назад

      Yeah i know russian
      Not my first language tho :)