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 ... - Наука та технологія
Were gonna get recommended this in 15 years arent we..?
No doubt about it, UA-cam's fyp page is all about that.
no
@@WojtekPlayyes
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
Looking to be reminded of this comment in the 2030s
It would be interesting if they were colored and the color coresponds with the mass of the object.
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.
Yeah, this by itself is fairly meaningless.
This will just create messy results
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..?
@@gabedude68 No, I never tried to simulate anything that "decayed" orbital energy.
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...
What can I learn from this wonderful simulation.
In 2D space, the strength of gravity will decrease linearly with distance, aye?
Yes
See u all after 10 years
The mote in Gpu’s eye
Interesting demonstration of how a distributed population of stellar black holes might interact in a galaxy!
When is the black hole forming?
Nah that trip was wild
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
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
It became a triskelion in the end
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.
I started doing a grid based approach but didn't get it working
I have now done the grid based version, runs a lot faster, you can try it at arganoid.itch.io
needs some gpc bass music
02:15 two particles at the left: let's just send this guy to the god
Particles appear to be absorbing each other upon collisions
Yes, they merge together combining the masses and preserving momentum
Ну, как вы там, потомки?
DUDE MORE VIDS OF TYOUR CAT
fascinating
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.
Amazing video, please do it.
Check out my new video with 15,000 particles! ua-cam.com/video/HGGcr5KaWG0/v-deo.htmlsi=OIq-jhgBztJAj1EH
Cool
Hey im not 15 years late!
Nice pattern but too slow
why is it not symmetrical? the spiral seems to be semetrical so the particles should stay in the centre
Maybe something to do with the limited precision of discrete binary representation of numbers in computers cascading over time?
@@jincheytry 0.2 + 0.1 in any programming language haha.
IEEE754
So scary!!
it seems you haven't enabled the slingshot effects
Whether you see any epic slingshots depends on the relative masses of the objects involved
3 body problem X 1666
They don’t seem to be gaining mass when they collide.
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!
Wah
This video would end in 0.0000000001 millisecond if we had *YOUR MOM* in the center💀
Put it 2x play back speed coz this is too slow.
It's actually sped up about 3x from the original simulation
@@Arganoid speed it up by 10x.
brooo, why virustotal detects 6 malwares on this thing.... i hope it's just a mistake
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.
When one body 'combines' with another does it impart its momentum?
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
thanks, great video!
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.
I don't understand why multiple people are talking about how they'll get recommended this in 10 years
idk to be honest, probably a joke, the video was interesting btw.
Thumbs up if you see this comment in 2033.
Thumbs up if you see this comment before 2033.