Тёмный

Nice bug 

Pezzza's Work
Подписаться 141 тыс.
Просмотров 990 тыс.
50% 1

Github github.com/johnBuffer/NoCol
Music used freepd.com/music/Screen%20Sav...
This is a reupload to fix typo.

Наука

Опубликовано:

 

8 апр 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 4,3 тыс.   
@PezzzasWork
@PezzzasWork 3 года назад
This is a reupload to fix a very bad typo
@Kid420
@Kid420 3 года назад
You have our forgiveness.
@Scrawlerism
@Scrawlerism 3 года назад
How bad??
@enderarchery2153
@enderarchery2153 3 года назад
Also... Hmmmm... Yea I guess it is a bug... But you only forgot to add a slight friction, or loss of energy transferred on collision, haven't you? So colliding items will always end up using another trajectory until they don't collide anymore. It's a universe without energy loss to friction/deformation.
@fdsKedi
@fdsKedi 3 года назад
@@enderarchery2153 Your profile picture is a gif!
@Bibibosh
@Bibibosh 3 года назад
This cant work
@liesnoneya
@liesnoneya 3 года назад
In your attempt to create a collision system, you created the coolest anti collision system ever.
@iarmycombo5659
@iarmycombo5659 3 года назад
When theres more it looked like an atom xD
@walterroche8192
@walterroche8192 3 года назад
Exactly! It really looks like a particle system, almost like electron's valence shell without the atoms at the core.
@pycz
@pycz 3 года назад
Must be some sign mistake...
@maxx-er3fj
@maxx-er3fj 3 года назад
System became what it swore to destroy
@iarmycombo5659
@iarmycombo5659 3 года назад
@@walterroche8192 Idk if any1 has done an animation of particle system be4 but he definitely should save that code.
@inigo8740
@inigo8740 3 года назад
When you try to make a collision handling system, but just end up making a system that has no collisions at all... Technically, you've solved the problem.
@skipfred
@skipfred 3 года назад
"How to write an O(0) collision engine"
@vachila643
@vachila643 3 года назад
Ah, technicality strikes again!
@skipfred
@skipfred 3 года назад
@@kaidatong1704 The n in O(n) is a variable that means the number of items to be handled. If n is constant then it's not O(n) time, it's O(1) (constant time) because the time to run doesn't depend on the number of items. You don't set constant values for n. O(0) is just a joke, since in a collision-free system you wouldn't even implement the function and thus is it would never actually take any time at all.
@kaidatong1704
@kaidatong1704 3 года назад
@@skipfred sry for spreading misinformation... I deleted my previous comment cuz too lazy to learn and make sure information accurate
@kaidatong1704
@kaidatong1704 3 года назад
vacuously true. didn't make any mistakes while processing collisions
@derpsquad3306
@derpsquad3306 2 года назад
Holy crap The precision in which these weren't coliding is insanely satisfying Hope you saved a version of your code with the "bug" and called it "art mode"
@alexstasko696
@alexstasko696 2 года назад
Well of course he saved it. If he didn't, this video would probably not exist
@sirpsionics
@sirpsionics 2 года назад
Some were colliding slightly. They just weren't being affected when they were hit
@alexstasko696
@alexstasko696 2 года назад
@@sirpsionics no they were not, it was just so close you would have to zoom a lot to see they actually don't touch. Cuz if they did it wouldn't be this smooth
@timangar9771
@timangar9771 Год назад
@@alexstasko696 I also think they become red upon touch. But I think he's right, sometimes they touch ever so slightly but the hitbox is too imprecise, that's my guess anyway.
@alexstasko696
@alexstasko696 Год назад
@@timangar9771 well maybe, it's just opinions and speculations anyway
@TehJumpingJawa
@TehJumpingJawa 2 года назад
I'd love to see an in-depth video explaining the mechanics behind this behaviour. As collision avoidance has such wide reaching & valuable applications it seems almost certain that this has already been discovered & no doubt named.
@hauuagdbhshg3604
@hauuagdbhshg3604 2 года назад
They push each other with constant force until they stop colliding, which requires producing energy out of nowhere. He just messed up conservation of momentum in his calculations.
@Gardor
@Gardor Год назад
preservation of angular momentum
@gyinagal
@gyinagal Год назад
What’s cool is you can use it to FIND a stable orbit for any number of objects
@Mr.Not_Sure
@Mr.Not_Sure 3 года назад
Once a programmer was asked: -- What are you coding now? -- Let's compile and see.
@saturnine.
@saturnine. 3 года назад
Compiling? *coughs in Python*
@OatmealTheCrazy
@OatmealTheCrazy 3 года назад
@@saturnine. The two weirdos alive who've decided to program on punch cards: "AMATEUR"
@dillon1012
@dillon1012 3 года назад
Underrated comment
@PotatoPrem
@PotatoPrem 2 года назад
@@OatmealTheCrazy the two wierdos who r not alive and decided to program by literally using switches, "Rookie mistake"
@OatmealTheCrazy
@OatmealTheCrazy 2 года назад
@@PotatoPrem ah, the good old ENIAC days
@oscardomingomartinez3455
@oscardomingomartinez3455 3 года назад
TFW you are trying to implement a collision system and you end up solving self driving cars
@TheProdiigy100
@TheProdiigy100 3 года назад
Ain't that ironic
@collin5577
@collin5577 3 года назад
@Colin Berg People do that already though, so no big deal.
@raphulali8937
@raphulali8937 3 года назад
@Colin Berg 😆😆
@imveryangryitsnotbutter
@imveryangryitsnotbutter 3 года назад
@Colin Berg For real tho, just run the simulation until the particles stop colliding and then use the non-colliding paths.
@TheStefanGenov
@TheStefanGenov 3 года назад
Somebody call Elon
@shottysteve
@shottysteve 2 года назад
i can imagine that if someone wanted to create a system where given any radii and position parameters had the task to find a stable orbit relationship without any collisions, it would be really difficult without the use of a neural network (and probably still really tough), but the fact you got this behavior via a bug is just hilarious. and the concept has a lot of potential as a game too. with planets… or somethin haha
@hapybratt8640
@hapybratt8640 2 года назад
I think you would be interested in the three body problem in physics (not the novel)
@hideousred
@hideousred 2 года назад
@@hapybratt8640 whats that?
@vinlebo88
@vinlebo88 2 года назад
@@hideousred once three or more objects attract each other, their orbits (in general) can't be predicted exactly.
@meklpeckle1936
@meklpeckle1936 2 года назад
hard to believe you're the same guy who poured mercury on his keyboard and sent a furry his address
@vizender
@vizender 2 года назад
Well in this case there’s no gravitational interaction between the bodies, they just have a single attraction point that stay stable in position and magnitude over time
@jeanf6295
@jeanf6295 2 года назад
If I understand the code, each ball is attracted by the center through an elastic force, while collisions directly displace pairs of overlapping particles away from each other in such a way that they end up barely touching, without modifying either of the registered speed values. Each ball has the same mass, so the period of each orbit is essentially the same, as a result the whole dance will stay in sync once the particles trajectories have been tuned to avoid overlapping. As far as I can tell, the speed itself is never updated by anything but the force, only the time-step size changes, that part is confusing but I guess that the simulation slows down when particles collide. However that would result in infinite acceleration toward the center would the particles jam upon each other so I may have missed something.
@LeLe-pm2pr
@LeLe-pm2pr 2 года назад
there is no drag or air force, and orbits are perfectly stable so the simulation will always stablize after a certain amount of time
@broor
@broor 2 года назад
They wouldnt need to have the same mass if the force is gravity like right?
@jeanf6295
@jeanf6295 2 года назад
@@broor if the force is proportional to mass yes
@orangeguy5374
@orangeguy5374 2 года назад
I don’t think the simulation slows down when the particles collide. To me, it looks like the particles temporarily slow down while they are pushing each other, and once they are free, they go back to their old speed
3 года назад
This guy: Hey, that's not what I meant to do Bug: It would be a lot cooler if you did
@Pumpkin-man
@Pumpkin-man 3 года назад
I mean he’s not wrong... ...unless we get into string theory/spaghetti code
@darkerbogg1117
@darkerbogg1117 3 года назад
it would've been harder to get to this if it was not a mistake
@HenriqueCavalcanti
@HenriqueCavalcanti 3 года назад
"I was trying to make these balls collide, and ended up creating the universe" said God
@APufferfish
@APufferfish 3 года назад
Nice bug
@comradesusiwolf1599
@comradesusiwolf1599 3 года назад
Perv
@APufferfish
@APufferfish 3 года назад
@@comradesusiwolf1599 what?
@Obi-Wen
@Obi-Wen 3 года назад
But apparently the universe functions based on many collisions lol
@Crazylom
@Crazylom 3 года назад
Bethesda created our Universe
@knightbeforedawn
@knightbeforedawn 2 года назад
This would be even more amazing if it were implemented into a 3D environment!
@anmise
@anmise 2 года назад
The way they orbit around eachother damn. It's like gravity is being used to repel em
@koba2160
@koba2160 3 года назад
"I don't know why but when I delete this line right here, this happens"
@Khrn-lk4mf
@Khrn-lk4mf 3 года назад
Deleting coconut.jpg be like
@BudgiePanic
@BudgiePanic 3 года назад
This happened to me yesterday, remove an int declaration and the whole program breaks, even tho that int is never used
@DuxAT
@DuxAT 3 года назад
@@BudgiePanic my programming experience in a nutshell
@sadboi6956
@sadboi6956 3 года назад
@@BudgiePanic lmfao. and then you go on stack overflow and nobody can help u. rip 😔🙏
@floor6156
@floor6156 3 года назад
This moe foe found a way to trace the shape of an atom using programmed circles
@123TeeMee
@123TeeMee 3 года назад
It's a sort of accidental evolutionary process, the orbits that don't have collisions survive while those that do get mutated into a different orbit where they get tested again. Very good example of emergence.
@aquafenaa
@aquafenaa 3 года назад
what how?
@user-ix6xw8ww6u
@user-ix6xw8ww6u 3 года назад
What is ur IQ, bro? Are you an alien?
@mrbombo2.096
@mrbombo2.096 3 года назад
@@user-ix6xw8ww6u the its kind of obvious if you really look at it and ignore the code.
@manformerlypigbukkit
@manformerlypigbukkit 3 года назад
Yeah, now that you mention it, it really does look like some alternate version of natural selection!
@GabrieleLabanca
@GabrieleLabanca 3 года назад
You mean that when they start they are actually colliding? I don't notice that from the video
@talktothehand1212
@talktothehand1212 2 года назад
I'm shocked. A few months back I decided to try to implement a collision system myself for fun, although the particles would look ahead, and if it saw the trails of any previous particles it would turn in a direction away from it. I randomly picked different wells of different strengths around the plane for the particles to have something to keep them from just bouncing against the walls, and the end result was basically this similar group weaving and bobbing, but the groups would collectively migrate to different parts of the screen. It wasn't what I was going for, but since I had written it where it could handle 10M particles, I loved what I ended up with that I never even considered "fixing it".
@misterkid
@misterkid 2 года назад
How one man's bug solved the equations for the particles of an atom.
@lucaayfmlyysiaejdsrtnnervd4646
@lucaayfmlyysiaejdsrtnnervd4646 3 года назад
"So I accidentally added a minus where there should've been a plus... This happened as a result"
@nothingnothing1799
@nothingnothing1799 3 года назад
He just forgot to add code to update the speed so the object move with 0 energy loss and eventually bounce off each other in a way that causes no new collisions quite simple and im sure most people that were trying to make a collision system have found a movement bug related to this exact bug, hes just probably the first to do it like this
@patricklepamplemousse884
@patricklepamplemousse884 3 года назад
@@nothingnothing1799 Yeah but we should take a moment to appreciate that guy's quote
@ekkehard8
@ekkehard8 3 года назад
@@nothingnothing1799 I think there must be a second error made as well. All of these take the same amount of time to complete their orbit, no matter how big their orbit is.
@sntg_p
@sntg_p 3 года назад
@@ekkehard8 I think that all the balls start moving at the same speed, and typically when they collide you would calculate the amount to slow them down by the balls mass (or aproximate it using their size) to have energy conservation.
@agsystems8220
@agsystems8220 3 года назад
@@ekkehard8 Not a physics error though, a test quirk. There is an inward force as part of the test, and it looks to be linear with respect to distance and mass, turning them into simple harmonic oscillators. This is the same physics that is used for almost all clocks. If anything it speaks to the accuracy of the physics code that an oscillator works accurately enough for this to be stable!
@BrodieEaton
@BrodieEaton 3 года назад
*Makes code to detect collisions* *Accidentally writes it to brute-force collisionless orbiting within a closed planetary system*
@Enirom
@Enirom 2 года назад
"There is no mistakes, only happy accidents" -Master Oogway
@mucahitkabaday1555
@mucahitkabaday1555 2 года назад
Your channel is so fascinating when youre high. Not only the visuals, also ideas popping your head because of videos
@ehsnils
@ehsnils 3 года назад
It's not a bug, it's a feature. Never underestimate the value of unexpected discoveries.
@primetime3422
@primetime3422 2 года назад
-Ducancraft (It's a Minecraft ripoff that was FULL of bugs that was kinda popular at this one camp I went to.)
@TH3RM4L
@TH3RM4L 2 года назад
Really, we shouldn't be placing a value on unexpected discoveries, but capitalism tends to do that. :( Why do we have to assign value to everything?
@ehsnils
@ehsnils 2 года назад
@@TH3RM4L You seem to have missed completely the quote by Isaac Asimov "The most exciting phrase to hear in science, the one that heralds new discoveries, is not 'Eureka!' but 'That's funny...'" The value isn't necessarily monetary, the value might be progress of humankind.
@treyt6474
@treyt6474 2 года назад
@@TH3RM4L Because if you want to trade your labor it has to have a value to someone else, simple as that :)
@TH3RM4L
@TH3RM4L 2 года назад
@@ehsnils idk why you talking about asimov, but when Ive looked at other comments, they talk about wanting to pay for this as a feature in some program. Ie, capitilaism has invaded even eureka moments like this
@neerajnandan3519
@neerajnandan3519 3 года назад
This looks like futuristic traffic where all automobiles are driverless thus driving perfectly without collisions
@EG80
@EG80 3 года назад
Looks like the traffic in the bee movie
@quangthanh3364
@quangthanh3364 3 года назад
And human will collapse all the program because Auto programs cant know how human work
@tacotime7894
@tacotime7894 2 года назад
cgp grey
@jiqci
@jiqci 2 года назад
Looks like traffic in India
@fredynogarotto
@fredynogarotto 2 года назад
They can use this guy algorithm...
@oberixGamer
@oberixGamer 11 дней назад
every once in a while i come back to this video, i love to remember this one so much
@commenturthegreat2915
@commenturthegreat2915 2 года назад
And that, ladies and gentlemen, is how the solar system formed
@thefriendorthefoe
@thefriendorthefoe 3 года назад
This feels like those videos of a city traffic stop that's full of pedestrians, bikers, and cars all moving right past one another, just barely skimming without any accidents
@rajeshpandey2198
@rajeshpandey2198 3 года назад
Yo this gives me nostalgia lmao
@jadiellima8922
@jadiellima8922 3 года назад
I'm gonna just search a video like this
@and_raw2036
@and_raw2036 3 года назад
Driving in india
@AAvfx
@AAvfx 3 года назад
This should be implemented as an animation plug-in for a composting software like AE.. I know Would pay for that.
@eletronnical1957
@eletronnical1957 3 года назад
Wait for it to blow up.
@exalented
@exalented 3 года назад
@@eletronnical1957 it'll go straight to your thighs..
@chavamora3863
@chavamora3863 3 года назад
@@exalented lmao i got that reference
@sepiks-9534
@sepiks-9534 3 года назад
@@myname1588 if a game had this as a loading screen, I would probably play it just for that
@Jedededededede
@Jedededededede 3 года назад
Or maybe a Visual VST for FL studio. Imagine that dancing at the speed of the music.
@ronaldiplodicus
@ronaldiplodicus 2 года назад
Following one specific green circle is so satisfying, I love it.
@Gleb08
@Gleb08 Год назад
Indian traffic never ceases to amaze me
@ugi062
@ugi062 3 года назад
2:05 The ship that has the main character be like:
@hifromtokyo3804
@hifromtokyo3804 3 года назад
that's funny
@valentinului
@valentinului 3 года назад
Underrated
@sydbrown310
@sydbrown310 3 года назад
That's what Plot Armor looks like
@8-bitato
@8-bitato 3 года назад
This joke doesn't work because none of the objects are colliding
@8-bitato
@8-bitato 3 года назад
@@Dragnulls exactly, none of the objects are colliding so pointing one out serves no purpose
@Mushroom38294
@Mushroom38294 3 года назад
"He's working perfectly in-sync with his parallel universe copies of himself!"
@ungeschaut
@ungeschaut 3 года назад
"HAYAAAAA"
@SU76M
@SU76M 2 года назад
Rick and Morty? No jokes, this is solid sci-fi.
@Mushroom38294
@Mushroom38294 2 года назад
@@SU76M no, I referenced TerminalMontage's Speedrunner Mario VS Melee Fox
@GMDTheOnyxGuyEizzX
@GMDTheOnyxGuyEizzX 2 года назад
Man, it's satisfying to see how objects are flying soooooo close to each other it seems like they're scratching each other, but yet they don't collide at all.
@Dominexis
@Dominexis 2 года назад
Often the ways that something can go wrong are far more fascinating than how it goes right.
@Shamil11
@Shamil11 3 года назад
It's like watching the DVD screen. waiting for it to touch one
@catfromreddit7148
@catfromreddit7148 3 года назад
Except it actually can’t touch even though there is nothing that says is should’nt
@juliasmith1182
@juliasmith1182 2 года назад
This is amazing! Holy heck!! This is better than when I was trying to shuffle an already shuffled list and instead got back a sorted one 😂
@Blue-Maned_Hawk
@Blue-Maned_Hawk 2 года назад
The precision of the timing in the orbits is incredible. Saved to goog
@JChaseFilms
@JChaseFilms 3 года назад
This is incredible! I can imagine somewhere someone wanted to intentionally set out to make something that looked like this, but the animation required to hand create something like this would take a quite a while! So cool to see something this beautiful come from coding.
@dagdbot83
@dagdbot83 3 года назад
Hi
@geniusprime9795
@geniusprime9795 3 года назад
You have a verified channel so i'm gonna comment here
@dagdbot83
@dagdbot83 3 года назад
@@geniusprime9795 agreed
@edgeworthbutcatboy
@edgeworthbutcatboy 3 года назад
@@geniusprime9795 same
@Solno12
@Solno12 3 года назад
@chakflying1
@chakflying1 3 года назад
So I read the code, and I would summarize it like this: basically he didn't implement velocity update when collision happens. When collision is detected (with simple radius check), he just nudged both of the spheres back away from each other just enough that they touch. The end effect is that they slide off of each other, continuing on their original path. So its like inelastic collision with no friction? Anyway it's these unique ingredients that drive the system to a stable state with no collision. Very cool!
@prakharsrivastava9568
@prakharsrivastava9568 3 года назад
Thanks for the explanation!
@weakamna
@weakamna 3 года назад
Thank you so much for an actual explanation from reading the code. There are so many comment trains here with wild speculations that I can't parse enough to figure out if they are valid or not. I was thinking I would have to grab the code myself and see, but you beat me too it.
@xdlmaoooo
@xdlmaoooo 3 года назад
Thats what I was thinking was going on, they are kind of acting like billiard-balls, where in reality some of the energy would dissipate as heat, here it simply perfectly transfers to the colliding objects.
@TheRABIDdude
@TheRABIDdude 3 года назад
@@xdlmaoooo No they aren't transferring energy to each other, that's the problem. They're ignoring each other's velocities, only slightly nudging each other enough to slide past without overlap.
@patrickpablo217
@patrickpablo217 3 года назад
is this right: the two colliding circles change each other's *positions* without changing either one's speed/direction/mass/etc? What happens in a near head on collision?
@jerem18h
@jerem18h 2 года назад
This is how I imagine autonomous cars driving together would be like
@1stSwadla
@1stSwadla Год назад
This is exactly how autonomous driving in the vehicle and intersections will work
@majortom6035
@majortom6035 3 года назад
My guess is that there's no velocity loss with any of the balls after they collide. So the balls fall to the centre and orbit around it and the collisions between each other are correcting their path until eventually, over time the balls develop paths that don't collide with any other ball or barely slide past one another. Cool bug.
@michaelbuckers
@michaelbuckers 3 года назад
Nah it's not that. This alone doesn't provide any force that would drive the system into collisionless state. Entropy doesn't reduce in its own.
@michaelbuckers
@michaelbuckers 3 года назад
@@JackGF936 Like I said fully elastic collisions alone (which fully conserve energy) isn't enough to produce this system state - the balls would just keep bouncing randomly forever. And neither are elastic collisions that generate energy, that just increases"orbital eccentricity" with every bounce thus reducing density and by extension the odds of collision, but doesn't moves anything into specifically collisionless trajectory. I invite you to attempt to replicate such result in a properly written physics simulation engine using any parameters you want - this scenario won't happen, other forces than restitution adjusted impact normal are required to achieve this effect.
@IlariVallivaara
@IlariVallivaara 3 года назад
@@michaelbuckers I think I have a simple counter-argument for your claim here: The balls basically try out different trajectories. If the ball does not have a free trajectory, it will collide. This will change the trajectory, and the ball will try a slightly altered one. This process will continue until all balls have free trajectories. After that we will see the behavior demonstrated in the video. I can not see how the system would converge to a "random bouncing state" you are suggesting there. (Or at least that is higly improbable with randomish start state.) The free trajectory state is the only one that does not change itself, so I am pretty sure the system will converge to that one. Also, I challenge you to produce this random bouncing state you claim will occur.
@michaelbuckers
@michaelbuckers 3 года назад
@@IlariVallivaara You're talking out of your ass. It doesn't even looks like you ever seen the elastic collision equation in your life. Go take a look at it and point out literally anything about it that suggests that any system of moving bodies will converge to a collisionless state, you massive dunce. Your challenge has been already complete: molecules of air never stop bouncing, objects in the solar system never stop colliding.
@IlariVallivaara
@IlariVallivaara 3 года назад
@@michaelbuckers You are confusing ideal simulation with messy real world, sir. Have a nice day!
@ThaRemo
@ThaRemo 3 года назад
These happy accidents are my favourite thing in programming, you can get endless hours of fun just by playing around and exploring its details. It's like going on an unexpected adventure
@redpepper74
@redpepper74 3 года назад
It’s like painting with bob ross except more logical, more frustrating, and more exploratory
@DavidFong21
@DavidFong21 3 года назад
Your comment reminds me of Sebastian Lague, who has one of the most entertaining programming series on RU-vid
@ThaRemo
@ThaRemo 3 года назад
@@DavidFong21 tssh, Sebastian's projects are child's play. I personally prefer ThaRemo's coding adventures
@DavidFong21
@DavidFong21 3 года назад
@@ThaRemo Sorry, who’s that? ;-P
@ThaRemo
@ThaRemo 3 года назад
@@DavidFong21 Their name is whispered is the hall of legends ;) But for real, Sebastian probably makes my favourite content on YT, mind-blowing every time!
@capivara6094
@capivara6094 2 года назад
This is what transit in the late 21th century will look like.
@JuanMurphy45
@JuanMurphy45 Год назад
This is becoming my favorite channel.
@-lucashissa-7883
@-lucashissa-7883 3 года назад
I feel like this is the type of thing that is gonna be recomended for me in 7 years.
@mr.mischiefman6419
@mr.mischiefman6419 3 года назад
Same
@silic8873
@silic8873 3 года назад
because it will
@NailujAgelliv
@NailujAgelliv 3 года назад
Your comment made me open the comments section just to check if you had commented this 7 years ago. I am now dissapointed lol
@3229dan
@3229dan 3 года назад
Yes
@katiekawaii
@katiekawaii 3 года назад
100%
@marzipug5439
@marzipug5439 3 года назад
I feel like this has a lot of potential. Some of the greatest things were found by accident :) Keep it up
@bigsmoke6414
@bigsmoke6414 3 года назад
Only Problem, he has to figure Out how He did that in Order to continue it😐
@terrasolaris5104
@terrasolaris5104 3 года назад
@@bigsmoke6414 He fixed the bug, so he must've found the code and deduce the output, and then work from there on to develop the output intentionally.
@marzipug5439
@marzipug5439 3 года назад
Especially at 2:27, seems like all their gravitational pulls have synchronised somehow. Search up Dyson Swarms, It's an idea where there are many orbiting solar panels around a star, which could provide enough energy for a type 1+ civilization (more advanced than our own). This technique could solve the problem of collisions between these panels. Sounds a bit crazy perhaps, but I think this technique could be very useful when implemented properly.
@Shmill
@Shmill 3 года назад
@@marzipug5439 Okay, but hear me out. The way this works is they keep crashing into each other until their orbits stabilize. I don't think that's viable to do with solar panels.
@karoshi2
@karoshi2 3 года назад
@@Shmill That's where this piece of software comes in handy to precalculate! 😁 Theoretically. Guess you'd prefer a bit of space between fast moving chunks of metal that won't keep their precise orbit in reality. 🤔
@jimturpin
@jimturpin 2 года назад
That is mind bending. I think it broke my brain. Can't even imagine how all the dynamics worked to provide what appears to be stable non-colliding orbit paths.
@WhiteKnuckleRide512
@WhiteKnuckleRide512 2 года назад
I legitimately spent hours trying to find this video the other day, I thought the effect was so cool but I had absolutely no idea what it was called. Eventually gave up. Now here it is in my recommendations. The world is weird.
@deesh6378
@deesh6378 3 года назад
I might be wrong but I think the reason this happens is that there's no loss of momentum when they collide just a change of the direction of momentum, so what happens is that they push each other out of the way but continue to move at the same speed, just in a different direction, which eventually causes the system to become stable.
@pasijutaulietuviuesas9174
@pasijutaulietuviuesas9174 2 года назад
This makes a lot of sense.
@jannevalkeapaa
@jannevalkeapaa 2 года назад
Yep, looks like that. You just solved the mystery. Yet it's facinating!
@chfr
@chfr 2 года назад
came to the same conclusion, no velocity is lost. However, collisions don't change their direction, instead they just nudge eachother while keeping their original direction. The other essential condition is that their size don't impact their speed, so once two balls have moved out of each other's respective paths, they'll never collide again unless they're moved by other balls.
@jakefromspace4659
@jakefromspace4659 2 года назад
This simple principle has wider applications..... In cases bound by Newtonian physics, should you inject enough energy into a media to overcome friction, but not entropy, it will eventually systematize so as to obey physics in the most efficient manner, causing the media to be more orderly. An example would be the "Frito's Bag" which claims that the chips in the bag may have settled in shipping, causing the air gap in the bag. The result is that the chips are stacked more orderly in the bottom of the bag than they were originally filled at the factory. Call it the "Lays Bag Theorem" ; P. This can be useful in manufacturing, medicine, and .... I just realized that's the principle behind the electrotreatment my GF receives for her nerve damage. I mean, I should probably finish my degree so I can learn exactly what this is called because I doubt this is original.
@milpy1257
@milpy1257 2 года назад
@@jakefromspace4659 Wooow, nice tangent you went there. Got me captivated from start to end.
@Mystixor
@Mystixor 3 года назад
As a programmer I can confirm I had goose bumps watching this
@TheDoh007
@TheDoh007 3 года назад
Same!
@akaHarvesteR
@akaHarvesteR 3 года назад
Indeed! This is amazing! How is that even happening?
@sebastiantorres3524
@sebastiantorres3524 Год назад
This video causes me anxiety but is awesome at the same time
@algozord
@algozord Год назад
the most satisfying and relaxing thing I've ever seen in my life
@BlueCoreGamming
@BlueCoreGamming 3 года назад
The website that hosts "Power Game" and "Power Game 2" has a planets game, and the physics works exactly like this
@WrinkledSkin4643
@WrinkledSkin4643 3 года назад
what is the link I cannot find it
@AzuriteCoast
@AzuriteCoast 3 года назад
@@WrinkledSkin4643 look for powder game or powder toy
@Zund0
@Zund0 3 года назад
@@WrinkledSkin4643 search for Powder game 2 danball in your browser or search Powder Game on play store
@RenegadeScooter
@RenegadeScooter 3 года назад
Congratulations Bluecore, you just misled someone with a double typo.
@galacticboy2009
@galacticboy2009 3 года назад
*Powder Game
@ifs-wolves9034
@ifs-wolves9034 3 года назад
Why did this make me so ecstatic, the tension of them being pixels away from each other and the overall flow is immense yet powerful.
@TheEvilCheesecake
@TheEvilCheesecake 2 года назад
Because so little is happening in your life that the bar for "ecstatic" has become set very, very low.
@ifs-wolves9034
@ifs-wolves9034 2 года назад
@@TheEvilCheesecake Not really sure what you're on about kid but if you can't respect art don't say anything.
@TheEvilCheesecake
@TheEvilCheesecake 2 года назад
If you can't respect my opinions don't say anything
@ifs-wolves9034
@ifs-wolves9034 2 года назад
@@TheEvilCheesecake Your opinion is void of interest and reasoning therefore not worth respecting.
@TheEvilCheesecake
@TheEvilCheesecake 2 года назад
So is yours and I'm ecstatic that you understand that.
@youfindararegreenmister
@youfindararegreenmister 2 года назад
Yooo this is like one of those satisfying videos, where everything fits perfectly
@YoDaPro
@YoDaPro 2 года назад
The definition of:"It's not a bug, it's a feature!"
@awesomewrecker0
@awesomewrecker0 3 года назад
This is how I'd imagine traffic to look once every car is autonomous and connected to the same network
@kartingbeast93
@kartingbeast93 3 года назад
Until somebody manages to gain access to that network and then you end up with the first program
@elie-noemecenero4436
@elie-noemecenero4436 3 года назад
it would be a bit traumatic ... ^^
@Danzignan
@Danzignan 3 года назад
And then one random car have a slight bug who make it deviate slighty of it's trajectory and an enormous accident happen as the result.
@TheBcoolGuy
@TheBcoolGuy 3 года назад
Dystopia
@giulianacesca4711
@giulianacesca4711 3 года назад
THAT TRAFFIC SCENE FROM THE BEE MOVIE
@furkanunsal1131
@furkanunsal1131 3 года назад
an ancient chinese guy: best war is the one you dont have to fight. this guy: best collision system is the one you don't collide.
@arvind31459
@arvind31459 3 года назад
Ohh now I know why them came up with "corona" so they don't have to fight
@shlabedeshlub3334
@shlabedeshlub3334 3 года назад
@@arvind31459 "came up with corona"
@rachard
@rachard 3 года назад
@@shlabedeshlub3334 kek
@lechatrelou6393
@lechatrelou6393 2 года назад
"That time I accidentaly created atoms."
@acidxero
@acidxero 2 года назад
The satisfying feeling that comes from seeing the old DVD player screensaver hit pixel perfect in the corner.. you know what I'm talking about.. it appears you've accidentally created an infinite loop of that very sort of satisfaction.. hnng~ Someone get this person a lifetime achievement award.
@Patashu
@Patashu 3 года назад
You weren't kidding. This is the most satisfying thing I've seen in a while
@DanielPizarro184
@DanielPizarro184 3 года назад
me as a computer science student would never think that a bug could be so gracious and majestic
@Leekodot15
@Leekodot15 2 года назад
You'd be surprised to see what people have done with bugs Still can't believe someone ported smb1 into smw just via gameplay alone
@lostmeme9862
@lostmeme9862 2 года назад
Degree in computer science don’t mean you know shit.
@DanielPizarro184
@DanielPizarro184 2 года назад
@@lostmeme9862 but it means I understand it
@freerobux49
@freerobux49 2 года назад
​@@lostmeme9862 isnt the whole point of a degree to signify that you 'know shit' about a certain topic??
@gabydewilde
@gabydewilde 2 года назад
You will see your share of weird shit, trust me. My funniest was a 200ish line function that I wrote while rather absent minded. I ran it, it worked perfectly. After running it for a really really long time it returned an answer that was obviously wrong. I thought the bug cant be that complicated as it otherwise did exactly what was expected. Looking at it I found many totally obviously wrong conditionals. Swapped AND's and OR's, < in stead of >, lookups in the wrong spot of an array. All easy to fix but in stead I sat there for some 30 min wondering how it ever produced a correct result. There was some mad unexpected recursion going on where n wrongs made a right. I couldn't figure it out. Probably the most complicated code I ever read. (I use to write machine code) It was all so obviously wrong my theory is that some higher entity took over my hand and made a joke.
@Endrw
@Endrw 2 года назад
literally one of my favourite videos ever
@enchantedplayer6168
@enchantedplayer6168 2 года назад
This reminds me of those really satisfying videos of the "perfect world" intersections
@TinyWaterBottle.
@TinyWaterBottle. 3 года назад
The fact that they dont touch each other is truly fascinating
@namt3628
@namt3628 3 года назад
Yes
@ZLP-TM
@ZLP-TM 3 года назад
They do Touch each other Sometimes. Watch closely
@creampielover69
@creampielover69 3 года назад
@@ZLP-TM it may appear that they are touching because of the technical limitations of your display but if the calculations are correct, there should always be some space between the circles.
@emilianozamora399
@emilianozamora399 3 года назад
It's almost as if that's the point of the video
@ZLP-TM
@ZLP-TM 3 года назад
@@creampielover69 They definitelly touch and slow down, watch closely. Thats mostlikely because he didnt run his program for long enough, it takes time for them to settle in
@veryangrytomato
@veryangrytomato 3 года назад
This would be the dopest looking main menu wallpaper of a futuristic space sci-fi game where traffic/travel is a thing, like in GTA or cyberpunk. You would see hundreds of spacecrafts just perfectly travelling through this portal intersection etc. (the tightest turn being the portal)
@lool8421
@lool8421 2 года назад
everything fits even more perfectly than the DVD hitting the corner
@amirgh3226
@amirgh3226 2 года назад
the DVD icon in old dvd players be like: "Finally, a worthy adversary..."
@jendaar
@jendaar 3 года назад
Watching this in slo-mo and waiting for them to collide is the new "DVD video" symbol hitting the corner.
@Andrew90046zero
@Andrew90046zero 3 года назад
This is amazing. It's almost like there is some "self-optimization" that is occurring. The first time they come into contact, they slide past each other and then orient themselves in such a way that they don't ever touch when they come back around. Pretty cool.
@mennoltvanalten7260
@mennoltvanalten7260 2 года назад
Well not the first time, in the big one it took like half an hour to happen. I suspect he forgot to implement some kind of friction to make things actually eventually stop, and then the can just keep bouncing until they reach some stable configuration where they slide just past each other
@user-qn9ku2fl2b
@user-qn9ku2fl2b 2 года назад
@@mennoltvanalten7260 yeah if the energy is conserved it's bound to happen at some point
@maninalift
@maninalift Год назад
I was skeptical at the title, but no, this is the best bug ever
@yorokobi9498
@yorokobi9498 2 года назад
That moment when you solve the two-body problem. Accidentally
@sweetiewolfgirl
@sweetiewolfgirl 3 года назад
Accidentally made a simulation of particles. Something that never collides by trying to make them collide. That is genuinely really cool
@davidbarnes6672
@davidbarnes6672 3 года назад
This is basically a simulation of my anti-social self doing my best to avoid human contact at every turn
@Mandor3
@Mandor3 3 года назад
Me, when I walk with my dog
@esatd34
@esatd34 3 года назад
And being extremely good at it
@Rick-ty9ky
@Rick-ty9ky 3 года назад
@@Mandor3 Lol, can relate.
@Mandor3
@Mandor3 3 года назад
@@marvinkohrt9581 uh no
@albingrahn5576
@albingrahn5576 2 года назад
you wanted to make a collision system, but you managed to make a system that somehow never collide. amazing
@v.p22709
@v.p22709 Год назад
This is potentially the best public transport driver in the whole universe. Genius.
@DanteBarboza
@DanteBarboza 3 года назад
It is just incredible, it looks like it makes everything in sync perfectly. A bug that happens to be a feature.
@animal_gal_adventures9885
@animal_gal_adventures9885 3 года назад
The man tried to make a collision system, but instead made a chaotic orbit creator. Imagine if those dots were planets and how beautiful yet scary it would be to live there.
@craidiefin
@craidiefin 3 года назад
In 23 days mars will have a close approach of 5 meters over northern France. Due to this everything north of Béthune and Roubaix will be evacuated. Anyone Living in Belgium, Netherlands or north of Paris is advised to spend the day underground.
@rasmusravnfrost2700
@rasmusravnfrost2700 2 года назад
Would be very cool. Though it wouldn't work since this simulation doesn't include gravity between the bodies. Also, I don't think you would want to experience the tidal waves created by that! :) Another unfortunate thing is that gravity would (approximately) cancel out when the planets were at their closest. Lots of weird stuff would basically happen!
@Milim-.-Nava
@Milim-.-Nava 2 года назад
This turned from collision to anxiety
@AS-wd3sd
@AS-wd3sd 2 года назад
The last part made me feels like I am watching 007 movies
@Tobo3370
@Tobo3370 3 года назад
Next week : "I have created an entire solar system and life by a nice bug"
@alexisp-c379
@alexisp-c379 3 года назад
Maybe our universe is only a bug in a simulation
@Tobo3370
@Tobo3370 3 года назад
@@alexisp-c379 This is the way
@orctrihar
@orctrihar 3 года назад
@@alexisp-c379 That a possibility and why I love the butterfly effect
@FredGlt
@FredGlt 3 года назад
The matrix all started with a bug
@orctrihar
@orctrihar 3 года назад
@@FredGlt Well, don't have watched the lore of Matrix for now but that a possibility
@callanbrain8579
@callanbrain8579 3 года назад
You should do this again but make the trail lines of each ball stay rather than fade away. You’ll probably get some cool patterns
@L3monsta
@L3monsta 3 года назад
It would result in a bunch of ovals
@dardade3277
@dardade3277 2 года назад
That is some incredible mathematic precision. Everything is exactly where it needs to be.
@kittlemax836
@kittlemax836 2 года назад
Someone: How many near hits do you want? This simulation: All of them
@boyfriend6088
@boyfriend6088 3 года назад
When the main goal is to collide them but you end up making them avoid each other
@BobtheHat
@BobtheHat 3 года назад
fnf boyfriend
@monojitchatterjee3185
@monojitchatterjee3185 3 года назад
"Failure"
@keyk2040
@keyk2040 3 года назад
it is surprising how many cool things can happen with a "little" bug but this is so interesting great work
@VeganSemihCyprus33
@VeganSemihCyprus33 3 года назад
A single change can lead to huge differences, check out this new documentary to see the big picture ------> The Connections (2021)
@Adomas_B
@Adomas_B 3 года назад
This is a rare example. 95% of bugs will probably crash your app
@caglarbulgay2751
@caglarbulgay2751 3 года назад
yeah let me google stackoverflow for the answers on my cool little bug "Unexpected indent"
@homeyworkey
@homeyworkey 3 года назад
@@Adomas_B thats what makes these moments so cool
@nuftuf5659
@nuftuf5659 2 года назад
Literally the best desktop background I've seen
@cedricschoonen1840
@cedricschoonen1840 3 года назад
This is cool! I saw your initial upload two weeks ago. I downloaded your code and tried to understand what makes this effect emerge. There is a comment under your previous video explaining that this effect happened because you updated only the positions and not the velocities of the colliding sphere. This is true and I think it is indeed part of why the system is not chaotic (in the mathematical sense: small errors on the initial velocities are not amplified by the collision since you do not update them). I would like to add that there is something else that is very important for it to work. It is that you are using a force that is linear in the distance to the centre (like a spring). It has the nice property that all the particles will oscillate around the centre with oscillate with the same frequency and thus the trajectories can remain independent. If you add a small non-linear term in r (e.g. 1e-6*r^3) the oscillations are non synchronized and the particles end up colliding again. It is the collision code that forces the particles to follow independent trajectories but it is the specific nature of the force that let the particles keep their independence. This is indeed a nice "bug". It would be interesting to find an application for this, but I cannot think of any in physics because these collisions do not obey the conservation of momentum. Maybe it can still be used to find an suitable initial configuration for a physically correct simulation. Otherwise I saw requests for a screensaver, this is a good idea too :) PS: Happy to see another user of the SFML library!
@PezzzasWork
@PezzzasWork 3 года назад
I changed the code to make the attraction force proportionnal to the radius of the objects and in this case the orbits tend to become concentric circles. And yes I love SFML, I use it for all my projects :)
@yusufklc7821
@yusufklc7821 3 года назад
@@PezzzasWork SFML is great :D
@skaramicke
@skaramicke 3 года назад
I was so excited about this for a few minutes before reading this comment. I thought it was an automatic many body problem solver, but then that requires simulated gravity to be a thing.
@fakestory1753
@fakestory1753 3 года назад
@@skaramicke the orbit here goes around the center if ellipse, instead of the focus of ellipse also all objects has same periodic
@tombackhouse9121
@tombackhouse9121 3 года назад
Hooray I was looking for the people who noticed this, I see you're all here. Concentric circles would make sense in that case, without the global periodicity imposed by the linear force, that would seem to be the most natural way to get a stable solution. I would be curious to see if that also happens if you use a Newtonian potential
@lukedare-white3131
@lukedare-white3131 3 года назад
Woah this is super cool, its insane that all the orbits manage to find harmonics without any of them completely stopping!
@agsystems8220
@agsystems8220 3 года назад
It looks like the inward force is linear with distance and mass, turning them all into simple harmonic oscillators. The orbital period is fixed, irrespective of orbital parameters. It is the same physics as a pendulum, that swings in the same time no matter how heavy the mass or distance of the swing.
@jenkathefridge3933
@jenkathefridge3933 2 года назад
2:13 when your the main character in a zombie movie
@skrillex53000
@skrillex53000 2 года назад
Best video and most satisfying video I EVER SEEN good work!
@personrbx4179
@personrbx4179 3 года назад
The way the spheres so perfectly avoid each other is mesmerizing.
@MrBaoomTheFirst
@MrBaoomTheFirst 3 года назад
Nobody: The protagonist in an action movie during the shoot out: 2:03
@alsiredwood5642
@alsiredwood5642 3 года назад
Ga h , just what i was gonna put :oo
@sallanta_
@sallanta_ 3 года назад
Narrowly avoiding everything? Sounds about right.
@ervins775
@ervins775 2 года назад
In your attempt to create a collision system, you created the universe
@Codebreakerblue
@Codebreakerblue 2 года назад
This is singlehandedly the most cinematic thing I've seen in my entire life
@magicmerls291
@magicmerls291 3 года назад
Some of the greatest things invented were accidents. Penicillin, Teflon, post it notes and corn flakes just to name a few. It happens from time to time and if it does it's just so satisfying. Glad that happened for you!
@user-od7hh8qg9d
@user-od7hh8qg9d 2 года назад
Teflon is poisonous.
@magicmerls291
@magicmerls291 2 года назад
@@user-od7hh8qg9d it only is if you heat it up too much or if you use metal cutlery to scrap out food of it
@user-od7hh8qg9d
@user-od7hh8qg9d 2 года назад
@@magicmerls291 have you ever heard of using oil?
@magicmerls291
@magicmerls291 2 года назад
@@user-od7hh8qg9d why don't do both?
@TheQuilavaQueen
@TheQuilavaQueen 3 года назад
2:25 Humanity somehow surviving 2020
@Bosper
@Bosper Год назад
This reminds me so much of stars orbiting Sagittarius A* that it hurts my head. It seems like a 2D representation of 3D spheres in orbit around the centre. Kind of mesmerizing.
@Sheepo-gk9yx
@Sheepo-gk9yx Год назад
my man has simulated LA traffic but every driver has a mind
@huhneat1076
@huhneat1076 3 года назад
Every time I try to watch this video I get this cool loading screen with green circles instead
Далее
Turning bugs into Art
7:43
Просмотров 193 тыс.
How to train simple AIs to balance a double pendulum
24:59
AI Learns How To Play The Chrome Dinosaur Game
10:34
Evolving AIs - Predator vs Prey, who will win?
12:15
Просмотров 2,8 млн
Naming Things in Code
7:25
Просмотров 1,9 млн
Ellipse-billiard simulation
2:41
Просмотров 2,6 млн
I Made a 1D Game 🎮
11:18
Просмотров 1,7 млн
How Particle Life emerges from simplicity
10:16
Просмотров 322 тыс.
wireless switch without wires part 6
0:49
Просмотров 1,5 млн
гений починил ноутбук
0:29
Просмотров 2 млн