2D gravity simulation with 5000 particles

Sdílet
Vložit
  • čas přidán 10. 06. 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 ...
  • Věda a technologie

Komentáře • 77

  • @PaulVeauthierjr.
    @PaulVeauthierjr. Před rokem +151

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

    • @Mmorozovsky
      @Mmorozovsky Před rokem +9

      No doubt about it, CZcams's fyp page is all about that.

    • @WojtekPlay
      @WojtekPlay Před rokem +1

      no

    • @Colonel_Jurten
      @Colonel_Jurten Před rokem +3

      ​@@WojtekPlayyes

    • @evilduckling3469
      @evilduckling3469 Před rokem

      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 Před rokem +1

      Looking to be reminded of this comment in the 2030s

  • @Aeneas137
    @Aeneas137 Před 9 měsíci +25

    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 Před 5 měsíci +1

      Yeah, this by itself is fairly meaningless.

    • @blinded6502
      @blinded6502 Před 4 měsíci

      This will just create messy results

    • @gabedude68
      @gabedude68 Před 3 měsíci

      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 Před 3 měsíci

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

  • @jeremyrobinson9660
    @jeremyrobinson9660 Před 3 měsíci +12

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

  • @romanpriest
    @romanpriest Před rokem +6

    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 Před 2 měsíci +2

    What can I learn from this wonderful simulation.

  • @lewisleslie2821
    @lewisleslie2821 Před 2 měsíci +1

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

  • @keesvrins8410
    @keesvrins8410 Před 3 měsíci +1

    When is the black hole forming?

  • @ripper5941
    @ripper5941 Před rokem +6

    See u all after 10 years

  • @Arganoid
    @Arganoid  Před 3 měsíci +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 Před 3 měsíci

      Amazing video, please do it.

  • @Arganoid
    @Arganoid  Před 3 měsíci +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

  • @Arganoid
    @Arganoid  Před 3 měsíci +1

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

  • @shhhh_4273
    @shhhh_4273 Před rokem

    Nah that trip was wild

  • @thesquee1838
    @thesquee1838 Před 5 měsíci

    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  Před 5 měsíci

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

    • @Arganoid
      @Arganoid  Před 3 měsíci

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

  • @SoulDelSol
    @SoulDelSol Před 3 měsíci

    Particles appear to be absorbing each other upon collisions

    • @Arganoid
      @Arganoid  Před 3 měsíci

      Yes, they merge together combining the masses and preserving momentum

  • @fun-damentals6354
    @fun-damentals6354 Před 9 měsíci +2

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

    • @jinchey
      @jinchey Před 5 měsíci +2

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

    • @eksno
      @eksno Před 3 měsíci

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

    • @xl000
      @xl000 Před měsícem

      IEEE754

  • @israrisrar3800
    @israrisrar3800 Před 7 měsíci

    It became a triskelion in the end

  • @steveschunk5702
    @steveschunk5702 Před 3 měsíci +2

    The mote in Gpu’s eye

  • @aniksamiurrahman6365
    @aniksamiurrahman6365 Před 3 měsíci +1

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

  • @keremokumus2834
    @keremokumus2834 Před rokem

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

  • @rezadaneshi
    @rezadaneshi Před rokem +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

  • @zeroed
    @zeroed Před rokem +1

    needs some gpc bass music

  • @cringium
    @cringium Před 8 měsíci

    fascinating

  • @Alex_the_Human
    @Alex_the_Human Před rokem +1

    DUDE MORE VIDS OF TYOUR CAT

  • @florin-titusniculescu5871
    @florin-titusniculescu5871 Před 8 měsíci

    it seems you haven't enabled the slingshot effects

    • @Arganoid
      @Arganoid  Před 8 měsíci

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

  • @nunyabitnezz2802
    @nunyabitnezz2802 Před 3 měsíci

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

    • @Arganoid
      @Arganoid  Před 3 měsíci +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!

  • @mightyelf2660
    @mightyelf2660 Před rokem

    Cool

  • @user-zd6tj3gi6e
    @user-zd6tj3gi6e Před 3 měsíci

    So scary!!

  • @robbiekavanagh2802
    @robbiekavanagh2802 Před rokem

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

    • @Arganoid
      @Arganoid  Před rokem +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 Před rokem

      thanks, great video!

  • @Colonel_Jurten
    @Colonel_Jurten Před rokem +1

    Hey im not 15 years late!

  • @naptimusnapolyus1227
    @naptimusnapolyus1227 Před rokem

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

  • @SpectraI
    @SpectraI Před 3 měsíci

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

  • @protimsinha
    @protimsinha Před rokem

    Wah

  • @davidm2.johnston684
    @davidm2.johnston684 Před rokem

    Nice pattern but too slow

  • @dikiy_0pezdal
    @dikiy_0pezdal Před 9 měsíci

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

    • @Arganoid
      @Arganoid  Před 9 měsíci

      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.

  • @Huntua
    @Huntua Před 7 měsíci

    3 body problem X 1666

  • @wholesand
    @wholesand Před rokem +1

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

    • @Arganoid
      @Arganoid  Před rokem

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

    • @wholesand
      @wholesand Před rokem

      @@Arganoid speed it up by 10x.

  • @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  Před rokem

      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. Před rokem

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

  • @JavSusLar
    @JavSusLar Před 3 měsíci

    Thumbs up if you see this comment in 2033.

    • @JavSusLar
      @JavSusLar Před 3 měsíci

      Thumbs up if you see this comment before 2033.