2D gravity simulation with 5000 particles

  Рет қаралды 35,545

Andrew Gillett

Andrew Gillett

Күн бұрын

Download the Particle Universe program at arganoid.itch.io/
Get the source code at github.com/arg...
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 ...

Пікірлер: 79
@PaulVeauthierjr.
@PaulVeauthierjr. Жыл бұрын
Were gonna get recommended this in 15 years arent we..?
@Mmorozovsky
@Mmorozovsky Жыл бұрын
No doubt about it, KZbin's fyp page is all about that.
@WojtekPlay
@WojtekPlay Жыл бұрын
no
@Colonel_Jurten
@Colonel_Jurten Жыл бұрын
​@@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 Жыл бұрын
Looking to be reminded of this comment in the 2030s
@jeremyrobinson9660
@jeremyrobinson9660 6 ай бұрын
It would be interesting if they were colored and the color coresponds with the mass of the object.
@romanpriest
@romanpriest Жыл бұрын
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...
@lewisleslie2821
@lewisleslie2821 4 ай бұрын
Interesting demonstration of how a distributed population of stellar black holes might interact in a galaxy!
@Nnamdi-wi2nu
@Nnamdi-wi2nu 5 ай бұрын
What can I learn from this wonderful simulation.
@ripper5941
@ripper5941 Жыл бұрын
See u all after 10 years
@fun-damentals6354
@fun-damentals6354 11 ай бұрын
why is it not symmetrical? the spiral seems to be semetrical so the particles should stay in the centre
@jinchey
@jinchey 7 ай бұрын
Maybe something to do with the limited precision of discrete binary representation of numbers in computers cascading over time?
@eksno
@eksno 6 ай бұрын
​@@jincheytry 0.2 + 0.1 in any programming language haha.
@xl000
@xl000 3 ай бұрын
IEEE754
@Arganoid
@Arganoid 5 ай бұрын
Check out my new video with 15,000 particles! kzbin.info/www/bejne/fniqlKVrgMaKfZIsi=OIq-jhgBztJAj1EH
@veroxid
@veroxid 2 ай бұрын
The animation doesn't quite feel right: the higher mass objects that were already in the center started to be pulled away from each other leaving a doughnut shape. Assuming it _is_ an error, I think it is because it's calculating all gravity equally for all objects, making the "center of gravity" more like a "ring of gravity" at the start. If I'm wrong, well...there's a reason why I chose the word "feel," Lol.
@Arganoid
@Arganoid Ай бұрын
The code is available on GitHub, you can check it for yourself
@zeroed
@zeroed Жыл бұрын
needs some gpc bass music
@Alex_the_Human
@Alex_the_Human Жыл бұрын
DUDE MORE VIDS OF TYOUR CAT
@SpectraI
@SpectraI 5 ай бұрын
Ну, как вы там, потомки?
@Colonel_Jurten
@Colonel_Jurten Жыл бұрын
Hey im not 15 years late!
@dikiy_0pezdal
@dikiy_0pezdal 11 ай бұрын
brooo, why virustotal detects 6 malwares on this thing.... i hope it's just a mistake
@Arganoid
@Arganoid 11 ай бұрын
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.
@cringium
@cringium 10 ай бұрын
fascinating
@robbiekavanagh2802
@robbiekavanagh2802 Жыл бұрын
When one body 'combines' with another does it impart its momentum?
@Arganoid
@Arganoid Жыл бұрын
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!
@davidm2.johnston684
@davidm2.johnston684 Жыл бұрын
Nice pattern but too slow
@protimsinha
@protimsinha Жыл бұрын
Wah
@Aeneas137
@Aeneas137 Жыл бұрын
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 7 ай бұрын
Yeah, this by itself is fairly meaningless.
@blinded6502
@blinded6502 6 ай бұрын
This will just create messy results
@gabedude68
@gabedude68 5 ай бұрын
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 5 ай бұрын
@@gabedude68 No, I never tried to simulate anything that "decayed" orbital energy.
@Arganoid
@Arganoid 5 ай бұрын
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
@steveschunk5702
@steveschunk5702 6 ай бұрын
The mote in Gpu’s eye
@Arganoid
@Arganoid 5 ай бұрын
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 5 ай бұрын
Amazing video, please do it.
@keesvrins8410
@keesvrins8410 6 ай бұрын
When is the black hole forming?
@rezadaneshi
@rezadaneshi Жыл бұрын
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
@aniksamiurrahman6365
@aniksamiurrahman6365 5 ай бұрын
In 2D space, the strength of gravity will decrease linearly with distance, aye?
@Arganoid
@Arganoid 5 ай бұрын
Yes
@wholesand
@wholesand Жыл бұрын
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.
@ArnoldLushinge
@ArnoldLushinge 6 ай бұрын
So scary!!
@nunyabitnezz2802
@nunyabitnezz2802 5 ай бұрын
They don’t seem to be gaining mass when they collide.
@Arganoid
@Arganoid 5 ай бұрын
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!
@JavSusLar
@JavSusLar 5 ай бұрын
Thumbs up if you see this comment in 2033.
@JavSusLar
@JavSusLar 5 ай бұрын
Thumbs up if you see this comment before 2033.
@naptimusnapolyus1227
@naptimusnapolyus1227 Жыл бұрын
This video would end in 0.0000000001 millisecond if we had *YOUR MOM* in the center💀
@israrisrar3800
@israrisrar3800 10 ай бұрын
It became a triskelion in the end
@Huntua
@Huntua 10 ай бұрын
3 body problem X 1666
@keremokumus2834
@keremokumus2834 Жыл бұрын
02:15 two particles at the left: let's just send this guy to the god
@SoulDelSol
@SoulDelSol 6 ай бұрын
Particles appear to be absorbing each other upon collisions
@Arganoid
@Arganoid 6 ай бұрын
Yes, they merge together combining the masses and preserving momentum
@mightyelf2660
@mightyelf2660 Жыл бұрын
Cool
@shhhh_4273
@shhhh_4273 Жыл бұрын
Nah that trip was wild
@thesquee1838
@thesquee1838 7 ай бұрын
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 7 ай бұрын
I started doing a grid based approach but didn't get it working
@Arganoid
@Arganoid 5 ай бұрын
I have now done the grid based version, runs a lot faster, you can try it at arganoid.itch.io
@Just-a-Orion-on-the-internet.
@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.
@florin-titusniculescu5871
@florin-titusniculescu5871 10 ай бұрын
it seems you haven't enabled the slingshot effects
@Arganoid
@Arganoid 10 ай бұрын
Whether you see any epic slingshots depends on the relative masses of the objects involved
Realtime 2D Gravity Simulation
12:31
Brendan Galea
Рет қаралды 411 М.
Making an N-Body Simulation
9:03
Deadlock
Рет қаралды 13 М.
Поветкин заставил себя уважать!
01:00
МИНУС БАЛЛ
Рет қаралды 6 МЛН
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 21 МЛН
Running With Bigger And Bigger Lunchlys
00:18
MrBeast
Рет қаралды 107 МЛН
Gravity Visualized
9:58
apbiolghs
Рет қаралды 139 МЛН
Chicxulub Tsunami-2.mov
8:17
ingomar200
Рет қаралды 2,3 МЛН
2D gravity simulation with 15,000 particles
10:16
Andrew Gillett
Рет қаралды 4,1 М.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,5 МЛН
A simple procedural animation technique
8:31
argonaut
Рет қаралды 384 М.
Gravity Simulation
5:24
JOrbits
Рет қаралды 18 М.
Particle Lenia
4:15
Programmable Artificial Life
Рет қаралды 46 М.
Lightning Fast Circle Rendering
6:23
Deadlock
Рет қаралды 74 М.
iPhone 15 Pro Max vs Pixel 9 🚀
0:18
serg1us
Рет қаралды 2,4 МЛН
Игровой руль - штука годная 👍
0:50
RxFx
Рет қаралды 3,8 МЛН
Evolution of PhoneVision
0:18
PhoneVision
Рет қаралды 615 М.
iPhone 7
0:13
ARGEN
Рет қаралды 7 МЛН