2D gravity simulation with 5000 particles

Поділитися
Вставка
  • Опубліковано 10 чер 2023
  • Download the Particle Universe program at arganoid.itch.io/
    Get the source code at github.com/arganoid/ParticleU...
    Find my website at arganoid.com/ where you can find details of my computer science and programming tutoring service, plus links to games of mine that you can buy. I am working on a new game which will be announced later this year.
    The latest video with 15,000 particles: • 2D gravity simulation ...
  • Наука та технологія

КОМЕНТАРІ • 77

  • @PaulVeauthierjr.
    @PaulVeauthierjr. Рік тому +147

    Were gonna get recommended this in 15 years arent we..?

    • @normika.
      @normika. Рік тому +8

      No doubt about it, UA-cam's fyp page is all about that.

    • @WojtekPlay
      @WojtekPlay Рік тому +1

      no

    • @Colonel_Jurten
      @Colonel_Jurten Рік тому +2

      ​@@WojtekPlayyes

    • @evilduckling3469
      @evilduckling3469 Рік тому

      Sadly I kinda doubt it. As interesting as this is, videos without audio dont usually do that. Tho I guess we'll just have to wait a few years to find out

    • @diracflux
      @diracflux Рік тому +1

      Looking to be reminded of this comment in the 2030s

  • @jeremyrobinson9660
    @jeremyrobinson9660 3 місяці тому +10

    It would be interesting if they were colored and the color coresponds with the mass of the object.

  • @Aeneas137
    @Aeneas137 9 місяців тому +23

    I spent a lot of time doing sims of this type and discovered that they don't produce good results unless you put them into motion. you can't fix them in place, they have to be moving and the " camera " has to follow the center of mass to really capture what's going on.

    • @starpawsy
      @starpawsy 4 місяці тому

      Yeah, this by itself is fairly meaningless.

    • @blinded6502
      @blinded6502 3 місяці тому

      This will just create messy results

    • @gabedude68
      @gabedude68 2 місяці тому

      any Sims you can share? Does this or any others simulate the tiny "drag" on spacetime caused by spin? so a stable orbit will decay over extremely long timescales? If its accurate, this should be able to demonstrate planet formation over long times with random starts..?

    • @starpawsy
      @starpawsy 2 місяці тому

      @@gabedude68 No, I never tried to simulate anything that "decayed" orbital energy.

  • @romanpriest
    @romanpriest Рік тому +5

    A similar simulation with calmer initial conditions lead to the formation of an imploding crust - because the forces on the outside particles are greatest - and then ever greater particles and, after ejecting some stuff, ending in one great particle, two great particles or, very rarely, more whereas one of them was dominant. Binary stars are plenty, aren't they...

  • @Nnamdi-wi2nu
    @Nnamdi-wi2nu 2 місяці тому +1

    What can I learn from this wonderful simulation.

  • @aniksamiurrahman6365
    @aniksamiurrahman6365 2 місяці тому +1

    In 2D space, the strength of gravity will decrease linearly with distance, aye?

  • @ripper5941
    @ripper5941 Рік тому +5

    See u all after 10 years

  • @steveschunk5702
    @steveschunk5702 3 місяці тому +2

    The mote in Gpu’s eye

  • @lewisleslie2821
    @lewisleslie2821 Місяць тому

    Interesting demonstration of how a distributed population of stellar black holes might interact in a galaxy!

  • @keesvrins8410
    @keesvrins8410 3 місяці тому +1

    When is the black hole forming?

  • @shhhh_4273
    @shhhh_4273 Рік тому

    Nah that trip was wild

  • @Arganoid
    @Arganoid  2 місяці тому +1

    Check out the new version of the app! Runs much faster than the old version. arganoid.itch.io/particle-universe/devlog/718528/particle-universe-16

  • @rezadaneshi
    @rezadaneshi Рік тому +6

    2D Is like when a fabric gets caught entangling a spinning drill bit. 3D is the same in principle In a spherical foam contracting to its focal point

  • @israrisrar3800
    @israrisrar3800 7 місяців тому

    It became a triskelion in the end

  • @thesquee1838
    @thesquee1838 4 місяці тому

    I took a quick look at the code; what about dividing the screen into discrete cells in a grid that hold references/pointers to the particles within the cell. This would allow you to do only local collision checks within the cell and you can also use the COM and Total mass of each grid cell for a generalized particle-to-cell attraction for cells far away from a particle. Instead of multiple threads interating over the container of particles for the simulation we can divide the cells up evenly to be split up amoungst the threads and process the forces on the particles within the cell in a lock free manner (no other thread will have access to the references to the particles within the cell hence no mutexes)
    With an approach like this you can make inserting particles into the grid / calculating forces / integration step all embarrasingly parallel allowing you to get rid of that huge vector of mutexes that need to be locked when two particles are interacting.

    • @Arganoid
      @Arganoid  4 місяці тому

      I started doing a grid based approach but didn't get it working

    • @Arganoid
      @Arganoid  2 місяці тому

      I have now done the grid based version, runs a lot faster, you can try it at arganoid.itch.io

  • @zeroed
    @zeroed Рік тому +1

    needs some gpc bass music

  • @keremokumus2834
    @keremokumus2834 Рік тому

    02:15 two particles at the left: let's just send this guy to the god

  • @SoulDelSol
    @SoulDelSol 3 місяці тому

    Particles appear to be absorbing each other upon collisions

    • @Arganoid
      @Arganoid  3 місяці тому

      Yes, they merge together combining the masses and preserving momentum

  • @SpectraI
    @SpectraI 2 місяці тому

    Ну, как вы там, потомки?

  • @Alex_the_Human
    @Alex_the_Human Рік тому +1

    DUDE MORE VIDS OF TYOUR CAT

  • @cringium
    @cringium 7 місяців тому

    fascinating

  • @Arganoid
    @Arganoid  2 місяці тому +1

    I'm looking at doing a new video with 30,000 particles, but that's so slow that I have to run the simulation for 10 hours to get 2 mins of footage. Also most of the particles are very light and orbiting the central area so they don't have much impact on the simulation other than vastly slowing it down. I have started to look at ways of greatly speeding up the simulation but currently that is not working.

    • @JavSusLar
      @JavSusLar 2 місяці тому

      Amazing video, please do it.

  • @Arganoid
    @Arganoid  2 місяці тому +1

    Check out my new video with 15,000 particles! ua-cam.com/video/HGGcr5KaWG0/v-deo.htmlsi=OIq-jhgBztJAj1EH

  • @mightyelf2660
    @mightyelf2660 Рік тому

    Cool

  • @Colonel_Jurten
    @Colonel_Jurten Рік тому +1

    Hey im not 15 years late!

  • @davidm2.johnston684
    @davidm2.johnston684 Рік тому

    Nice pattern but too slow

  • @fun-damentals6354
    @fun-damentals6354 8 місяців тому +2

    why is it not symmetrical? the spiral seems to be semetrical so the particles should stay in the centre

    • @jinchey
      @jinchey 4 місяці тому +2

      Maybe something to do with the limited precision of discrete binary representation of numbers in computers cascading over time?

    • @eksno
      @eksno 3 місяці тому

      ​@@jincheytry 0.2 + 0.1 in any programming language haha.

    • @xl000
      @xl000 11 днів тому

      IEEE754

  • @user-zd6tj3gi6e
    @user-zd6tj3gi6e 3 місяці тому

    So scary!!

  • @florin-titusniculescu5871
    @florin-titusniculescu5871 7 місяців тому

    it seems you haven't enabled the slingshot effects

    • @Arganoid
      @Arganoid  7 місяців тому

      Whether you see any epic slingshots depends on the relative masses of the objects involved

  • @Huntua
    @Huntua 7 місяців тому

    3 body problem X 1666

  • @nunyabitnezz2802
    @nunyabitnezz2802 2 місяці тому

    They don’t seem to be gaining mass when they collide.

    • @Arganoid
      @Arganoid  2 місяці тому +1

      They do, but the size is based on a logarithmic relationship to the mass which means that as the mass goes up, the size only increases by a tiny amount. Otherwise the central one would be thousands of screens wide. But I have added an option to customise this in a config file to the version on Github. Check out the new video with 15k particles!

  • @protimsinha
    @protimsinha Рік тому

    Wah

  • @naptimusnapolyus1227
    @naptimusnapolyus1227 Рік тому

    This video would end in 0.0000000001 millisecond if we had *YOUR MOM* in the center💀

  • @wholesand
    @wholesand Рік тому +1

    Put it 2x play back speed coz this is too slow.

    • @Arganoid
      @Arganoid  Рік тому

      It's actually sped up about 3x from the original simulation

    • @wholesand
      @wholesand Рік тому

      @@Arganoid speed it up by 10x.

  • @dikiy_0pezdal
    @dikiy_0pezdal 8 місяців тому

    brooo, why virustotal detects 6 malwares on this thing.... i hope it's just a mistake

    • @Arganoid
      @Arganoid  8 місяців тому

      It is not uncommon for antivirus software to show false positives. The source code is available to download on GitHub and you can build it yourself if you want to be sure.

  • @robbiekavanagh2802
    @robbiekavanagh2802 Рік тому

    When one body 'combines' with another does it impart its momentum?

    • @Arganoid
      @Arganoid  Рік тому +2

      Yes, the speed is averaged based on the relative masses, but sometimes the effect is not noticeable because there is quite a wide range of masses despite the similar sizes

    • @robbiekavanagh2802
      @robbiekavanagh2802 Рік тому

      thanks, great video!

  • @Just-a-Orion-on-the-internet.

    Hello future people, you may wonder why this video got reccomended to you 10 years after Adrew posted this, well.... that is how youtube works, now, meanwhile i am going to leave a time capsule for myself,
    Dus, hoe gaat het cealium, ben je nu in de vierde of misschien zelfs in de vijfde klas, hopelijk.... als de tijden slecht zijn,,,,,,,, dat je de dag van vadaag herrinerd, want vandaag gaat allesn nog goed.
    dit was em.

    • @Arganoid
      @Arganoid  Рік тому

      I don't understand why multiple people are talking about how they'll get recommended this in 10 years

    • @Just-a-Orion-on-the-internet.
      @Just-a-Orion-on-the-internet. Рік тому

      idk to be honest, probably a joke, the video was interesting btw.

  • @JavSusLar
    @JavSusLar 2 місяці тому

    Thumbs up if you see this comment in 2033.

    • @JavSusLar
      @JavSusLar 2 місяці тому

      Thumbs up if you see this comment before 2033.