In your attempt to create a collision system, you created the coolest anti collision system ever.
@iarmycombo56593 жыл бұрын
When theres more it looked like an atom xD
@walterroche81923 жыл бұрын
Exactly! It really looks like a particle system, almost like electron's valence shell without the atoms at the core.
@pycz3 жыл бұрын
Must be some sign mistake...
@maxx-er3fj3 жыл бұрын
System became what it swore to destroy
@iarmycombo56593 жыл бұрын
@@walterroche8192 Idk if any1 has done an animation of particle system be4 but he definitely should save that code.
@oscardomingomartinez34553 жыл бұрын
TFW you are trying to implement a collision system and you end up solving self driving cars
@TheProdiigy1003 жыл бұрын
Ain't that ironic
@collin55773 жыл бұрын
@Colin Berg People do that already though, so no big deal.
@raphulali89373 жыл бұрын
@Colin Berg 😆😆
@imveryangryitsnotbutter3 жыл бұрын
@Colin Berg For real tho, just run the simulation until the particles stop colliding and then use the non-colliding paths.
@TheStefanGenov3 жыл бұрын
Somebody call Elon
@inigo87403 жыл бұрын
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.
@skipfred3 жыл бұрын
"How to write an O(0) collision engine"
@vachila6433 жыл бұрын
Ah, technicality strikes again!
@skipfred3 жыл бұрын
@@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.
@kaidatong17043 жыл бұрын
@@skipfred sry for spreading misinformation... I deleted my previous comment cuz too lazy to learn and make sure information accurate
@kaidatong17043 жыл бұрын
vacuously true. didn't make any mistakes while processing collisions
@derpsquad33062 жыл бұрын
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"
@alexstasko6962 жыл бұрын
Well of course he saved it. If he didn't, this video would probably not exist
@sirpsionics2 жыл бұрын
Some were colliding slightly. They just weren't being affected when they were hit
@alexstasko6962 жыл бұрын
@@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
@timangar97712 жыл бұрын
@@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.
@alexstasko6962 жыл бұрын
@@timangar9771 well maybe, it's just opinions and speculations anyway
@Mr.Not_Sure3 жыл бұрын
Once a programmer was asked: -- What are you coding now? -- Let's compile and see.
@saturnine.3 жыл бұрын
Compiling? *coughs in Python*
@OatmealTheCrazy3 жыл бұрын
@@saturnine. The two weirdos alive who've decided to program on punch cards: "AMATEUR"
@dillon10123 жыл бұрын
Underrated comment
@PotatoPrem3 жыл бұрын
@@OatmealTheCrazy the two wierdos who r not alive and decided to program by literally using switches, "Rookie mistake"
@OatmealTheCrazy3 жыл бұрын
@@PotatoPrem ah, the good old ENIAC days
@koba21603 жыл бұрын
"I don't know why but when I delete this line right here, this happens"
@Khrn-lk4mf3 жыл бұрын
Deleting coconut.jpg be like
@BudgiePanic3 жыл бұрын
This happened to me yesterday, remove an int declaration and the whole program breaks, even tho that int is never used
@DuxAT3 жыл бұрын
@@BudgiePanic my programming experience in a nutshell
@sadboi69563 жыл бұрын
@@BudgiePanic lmfao. and then you go on stack overflow and nobody can help u. rip 😔🙏
@floor61563 жыл бұрын
This moe foe found a way to trace the shape of an atom using programmed circles
@thefriendorthefoe3 жыл бұрын
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
@rajeshpandey21983 жыл бұрын
Yo this gives me nostalgia lmao
@jadiellima89223 жыл бұрын
I'm gonna just search a video like this
@and_raw20363 жыл бұрын
Driving in india
@TehJumpingJawa2 жыл бұрын
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.
@hauuagdbhshg36042 жыл бұрын
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.
@Gardor2 жыл бұрын
preservation of angular momentum
@gyinagal2 жыл бұрын
What’s cool is you can use it to FIND a stable orbit for any number of objects
3 жыл бұрын
This guy: Hey, that's not what I meant to do Bug: It would be a lot cooler if you did
@Pumpkin-man3 жыл бұрын
I mean he’s not wrong... ...unless we get into string theory/spaghetti code
@darkerbogg11173 жыл бұрын
it would've been harder to get to this if it was not a mistake
@123TeeMee3 жыл бұрын
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.
@aquafenaa13 жыл бұрын
what how?
@StepanKorney3 жыл бұрын
What is ur IQ, bro? Are you an alien?
@mrbombo2.0963 жыл бұрын
@@StepanKorney the its kind of obvious if you really look at it and ignore the code.
@manformerlypigbukkit3 жыл бұрын
Yeah, now that you mention it, it really does look like some alternate version of natural selection!
@GabrieleLabanca3 жыл бұрын
You mean that when they start they are actually colliding? I don't notice that from the video
@BrodieEaton3 жыл бұрын
*Makes code to detect collisions* *Accidentally writes it to brute-force collisionless orbiting within a closed planetary system*
@shottysteve2 жыл бұрын
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
@hapybratt86402 жыл бұрын
I think you would be interested in the three body problem in physics (not the novel)
@hideousred2 жыл бұрын
@@hapybratt8640 whats that?
@vinlebo882 жыл бұрын
@@hideousred once three or more objects attract each other, their orbits (in general) can't be predicted exactly.
@meklpeckle19362 жыл бұрын
hard to believe you're the same guy who poured mercury on his keyboard and sent a furry his address
@vizender2 жыл бұрын
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
@AAvfx3 жыл бұрын
This should be implemented as an animation plug-in for a composting software like AE.. I know Would pay for that.
@eletronnical19573 жыл бұрын
Wait for it to blow up.
@exalented3 жыл бұрын
@@eletronnical1957 it'll go straight to your thighs..
@chavamora38633 жыл бұрын
@@exalented lmao i got that reference
@sephanthiel3 жыл бұрын
@@myname1588 if a game had this as a loading screen, I would probably play it just for that
@Jedededededede3 жыл бұрын
Or maybe a Visual VST for FL studio. Imagine that dancing at the speed of the music.
@PezzzasWork3 жыл бұрын
This is a reupload to fix a very bad typo
@Kid4203 жыл бұрын
You have our forgiveness.
@Scrawlerism3 жыл бұрын
How bad??
@enderarchery21533 жыл бұрын
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.
@fdsKedi3 жыл бұрын
@@enderarchery2153 Your profile picture is a gif!
@Bibibosh3 жыл бұрын
This cant work
@ehsnils3 жыл бұрын
It's not a bug, it's a feature. Never underestimate the value of unexpected discoveries.
@primetime34223 жыл бұрын
-Ducancraft (It's a Minecraft ripoff that was FULL of bugs that was kinda popular at this one camp I went to.)
@TH3RM4L2 жыл бұрын
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?
@ehsnils2 жыл бұрын
@@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.
@treyt64742 жыл бұрын
@@TH3RM4L Because if you want to trade your labor it has to have a value to someone else, simple as that :)
@TH3RM4L2 жыл бұрын
@@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
@misterkid2 жыл бұрын
How one man's bug solved the equations for the particles of an atom.
@neerajnandan35193 жыл бұрын
This looks like futuristic traffic where all automobiles are driverless thus driving perfectly without collisions
@EG803 жыл бұрын
Looks like the traffic in the bee movie
@quangthanh33643 жыл бұрын
And human will collapse all the program because Auto programs cant know how human work
@tacotime78943 жыл бұрын
cgp grey
@jiqci3 жыл бұрын
Looks like traffic in India
@fredynogarotto3 жыл бұрын
They can use this guy algorithm...
@HenriqueCavalcanti3 жыл бұрын
"I was trying to make these balls collide, and ended up creating the universe" said God
@APufferfish3 жыл бұрын
Nice bug
@comradesusiwolf15993 жыл бұрын
Perv
@APufferfish3 жыл бұрын
@@comradesusiwolf1599 what?
@PewPewBadaBoom3 жыл бұрын
But apparently the universe functions based on many collisions lol
@Crazylom3 жыл бұрын
Bethesda created our Universe
@lucaayfmlyysiaejdsrtnnervd46463 жыл бұрын
"So I accidentally added a minus where there should've been a plus... This happened as a result"
@nothingnothing17993 жыл бұрын
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
@patricklepamplemousse8843 жыл бұрын
@@nothingnothing1799 Yeah but we should take a moment to appreciate that guy's quote
@ekkehard83 жыл бұрын
@@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_p3 жыл бұрын
@@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.
@agsystems82203 жыл бұрын
@@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!
@knightbeforedawn2 жыл бұрын
This would be even more amazing if it were implemented into a 3D environment!
@ifs-wolves90343 жыл бұрын
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.
@TheEvilCheesecake2 жыл бұрын
Because so little is happening in your life that the bar for "ecstatic" has become set very, very low.
@ifs-wolves90342 жыл бұрын
@@TheEvilCheesecake Not really sure what you're on about kid but if you can't respect art don't say anything.
@TheEvilCheesecake2 жыл бұрын
If you can't respect my opinions don't say anything
@ifs-wolves90342 жыл бұрын
@@TheEvilCheesecake Your opinion is void of interest and reasoning therefore not worth respecting.
@TheEvilCheesecake2 жыл бұрын
So is yours and I'm ecstatic that you understand that.
@Shamil113 жыл бұрын
It's like watching the DVD screen. waiting for it to touch one
@catfromreddit71483 жыл бұрын
Except it actually can’t touch even though there is nothing that says is should’nt
@JChaseFilms3 жыл бұрын
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.
@dagdbot833 жыл бұрын
Hi
@geniusprime97953 жыл бұрын
You have a verified channel so i'm gonna comment here
@dagdbot833 жыл бұрын
@@geniusprime9795 agreed
@edgeworthbutcatboy3 жыл бұрын
@@geniusprime9795 same
@Solno123 жыл бұрын
@WhiteKnuckleRide5122 жыл бұрын
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.
@marzipug54393 жыл бұрын
I feel like this has a lot of potential. Some of the greatest things were found by accident :) Keep it up
@bigsmoke64143 жыл бұрын
Only Problem, he has to figure Out how He did that in Order to continue it😐
@terrasolaris51043 жыл бұрын
@@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.
@marzipug54393 жыл бұрын
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.
@Shmill3 жыл бұрын
@@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.
@karoshi23 жыл бұрын
@@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. 🤔
@ThaRemo3 жыл бұрын
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
@redpepper743 жыл бұрын
It’s like painting with bob ross except more logical, more frustrating, and more exploratory
@DavidFong213 жыл бұрын
Your comment reminds me of Sebastian Lague, who has one of the most entertaining programming series on KZbin
@ThaRemo3 жыл бұрын
@@DavidFong21 tssh, Sebastian's projects are child's play. I personally prefer ThaRemo's coding adventures
@DavidFong213 жыл бұрын
@@ThaRemo Sorry, who’s that? ;-P
@ThaRemo3 жыл бұрын
@@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!
@chakflying13 жыл бұрын
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!
@prakharsrivastava95683 жыл бұрын
Thanks for the explanation!
@weakamna3 жыл бұрын
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.
@xdlmaoooo3 жыл бұрын
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.
@TheRABIDdude3 жыл бұрын
@@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.
@patrickpablo2173 жыл бұрын
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?
@talktothehand12122 жыл бұрын
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".
@Mushroom382943 жыл бұрын
"He's working perfectly in-sync with his parallel universe copies of himself!"
@ungeschaut3 жыл бұрын
"HAYAAAAA"
@SU76M2 жыл бұрын
Rick and Morty? No jokes, this is solid sci-fi.
@Mushroom382942 жыл бұрын
@@SU76M no, I referenced TerminalMontage's Speedrunner Mario VS Melee Fox
@-lucashissa-78833 жыл бұрын
I feel like this is the type of thing that is gonna be recomended for me in 7 years.
@A-sharm3 жыл бұрын
Same
@silic88733 жыл бұрын
because it will
@NailujAgelliv3 жыл бұрын
Your comment made me open the comments section just to check if you had commented this 7 years ago. I am now dissapointed lol
@3229dan3 жыл бұрын
Yes
@katiekawaii3 жыл бұрын
100%
@DanielPizarro1843 жыл бұрын
me as a computer science student would never think that a bug could be so gracious and majestic
@Leekodot153 жыл бұрын
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
@lostmeme98623 жыл бұрын
Degree in computer science don’t mean you know shit.
@DanielPizarro1843 жыл бұрын
@@lostmeme9862 but it means I understand it
@gabydewilde2 жыл бұрын
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.
@TheMR-7772 жыл бұрын
It happens, when things go in inverse,
@jeanf62952 жыл бұрын
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-pm2pr2 жыл бұрын
there is no drag or air force, and orbits are perfectly stable so the simulation will always stablize after a certain amount of time
@broor2 жыл бұрын
They wouldnt need to have the same mass if the force is gravity like right?
@jeanf62952 жыл бұрын
@@broor if the force is proportional to mass yes
@orangeguy53742 жыл бұрын
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
@MajorTommmm3 жыл бұрын
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.
@michaelbuckers3 жыл бұрын
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.
@michaelbuckers3 жыл бұрын
@@LiraScarlet 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.
@IlariVallivaara3 жыл бұрын
@@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.
@michaelbuckers3 жыл бұрын
@@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.
@IlariVallivaara3 жыл бұрын
@@michaelbuckers You are confusing ideal simulation with messy real world, sir. Have a nice day!
@Mystixor3 жыл бұрын
As a programmer I can confirm I had goose bumps watching this
@TheDoh0073 жыл бұрын
Same!
@akaHarvesteR3 жыл бұрын
Indeed! This is amazing! How is that even happening?
@BluecoreG3 жыл бұрын
The website that hosts "Power Game" and "Power Game 2" has a planets game, and the physics works exactly like this
@WrinkledSkin46433 жыл бұрын
what is the link I cannot find it
@AzuriteCoast3 жыл бұрын
@@WrinkledSkin4643 look for powder game or powder toy
@Zund03 жыл бұрын
@@WrinkledSkin4643 search for Powder game 2 danball in your browser or search Powder Game on play store
@RenegadeScooter3 жыл бұрын
Congratulations Bluecore, you just misled someone with a double typo.
@galacticboy20093 жыл бұрын
*Powder Game
@justinwong36413 жыл бұрын
This would make for an epic screensaver!
@ugi0623 жыл бұрын
2:05 The ship that has the main character be like:
@hifromtokyo38043 жыл бұрын
that's funny
@valentinului3 жыл бұрын
Underrated
@sydbrown3103 жыл бұрын
That's what Plot Armor looks like
@8-bitato3 жыл бұрын
This joke doesn't work because none of the objects are colliding
@8-bitato3 жыл бұрын
@@Dragnulls exactly, none of the objects are colliding so pointing one out serves no purpose
@deesh63783 жыл бұрын
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.
@pasijutaulietuviuesas91742 жыл бұрын
This makes a lot of sense.
@jannevalkeapaa2 жыл бұрын
Yep, looks like that. You just solved the mystery. Yet it's facinating!
@chfr2 жыл бұрын
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.
@jakefromspace46592 жыл бұрын
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.
@milpy12572 жыл бұрын
@@jakefromspace4659 Wooow, nice tangent you went there. Got me captivated from start to end.
@Patashu3 жыл бұрын
You weren't kidding. This is the most satisfying thing I've seen in a while
@sondajprensi3 жыл бұрын
Your channel is so fascinating when youre high. Not only the visuals, also ideas popping your head because of videos
@awesomewrecker03 жыл бұрын
This is how I'd imagine traffic to look once every car is autonomous and connected to the same network
@kartingbeast933 жыл бұрын
Until somebody manages to gain access to that network and then you end up with the first program
@elie-noemecenero44363 жыл бұрын
it would be a bit traumatic ... ^^
@Danzignan3 жыл бұрын
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.
@TheBcoolGuy3 жыл бұрын
Dystopia
@giulianacesca47113 жыл бұрын
THAT TRAFFIC SCENE FROM THE BEE MOVIE
@TinyWotrBotl3 жыл бұрын
The fact that they dont touch each other is truly fascinating
@namt63 жыл бұрын
Yes
@ZLP-TM3 жыл бұрын
They do Touch each other Sometimes. Watch closely
@creampielover693 жыл бұрын
@@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.
@emilianozamora3993 жыл бұрын
It's almost as if that's the point of the video
@ZLP-TM3 жыл бұрын
@@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
@furkanunsal11313 жыл бұрын
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.
@arvind314593 жыл бұрын
Ohh now I know why them came up with "corona" so they don't have to fight
@shlabedeshlub33343 жыл бұрын
@@arvind31459 "came up with corona"
@rachard3 жыл бұрын
@@shlabedeshlub3334 kek
@oberixGamer6 ай бұрын
every once in a while i come back to this video, i love to remember this one so much
@Andrew90046zero3 жыл бұрын
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.
@mennoltvanalten72603 жыл бұрын
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-qn9ku2fl2b2 жыл бұрын
@@mennoltvanalten7260 yeah if the energy is conserved it's bound to happen at some point
@veryangrytomato3 жыл бұрын
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)
@jendaar3 жыл бұрын
Watching this in slo-mo and waiting for them to collide is the new "DVD video" symbol hitting the corner.
@feho-t6s2 жыл бұрын
1:24 that one teammate in dodgeball.
@callanbrain85793 жыл бұрын
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
@L3monsta3 жыл бұрын
It would result in a bunch of ovals
@DanteBarboza3 жыл бұрын
It is just incredible, it looks like it makes everything in sync perfectly. A bug that happens to be a feature.
@sweetiewolfgirl3 жыл бұрын
Accidentally made a simulation of particles. Something that never collides by trying to make them collide. That is genuinely really cool
@bighaverlegend333 жыл бұрын
This would make an amazing screen saver
@cedricschoonen18403 жыл бұрын
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!
@PezzzasWork3 жыл бұрын
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 :)
@yusufklc78213 жыл бұрын
@@PezzzasWork SFML is great :D
@skaramicke3 жыл бұрын
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.
@fakestory17533 жыл бұрын
@@skaramicke the orbit here goes around the center if ellipse, instead of the focus of ellipse also all objects has same periodic
@tombackhouse91213 жыл бұрын
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-white31313 жыл бұрын
Woah this is super cool, its insane that all the orbits manage to find harmonics without any of them completely stopping!
@agsystems82203 жыл бұрын
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.
@xhimus31033 жыл бұрын
i think you understand the Gravity of the situation!
@gigab0nus3 жыл бұрын
Acshually, gravity has an -1/r potential and here we see an r^2 potential around the center 🤓
@gigab0nus3 жыл бұрын
In -1/r the orbits would not have the same frequency so the balls would not meet so nice again
@emptyptr94013 жыл бұрын
@@gigab0nus I have never heard of that before (-1/r potential I mean), where can i find more information regarding this?
@gigab0nus3 жыл бұрын
@@emptyptr9401 The wikipedia article "Gravitational Energy" shows the basics of the -1/R potential very compactly. Its consequences are explained in the article "Orbit" and probably in any youtube video about orbits. The r^2 potential on the other hand is known under the name "harmonic oscillator" and can be found everywhere in physics
@emptyptr94013 жыл бұрын
@@gigab0nus ok thx
@juliasmith11822 жыл бұрын
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 😂
@magicmerls2913 жыл бұрын
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!
@Владислав-ы9м5у2 жыл бұрын
Teflon is poisonous.
@magicmerls2912 жыл бұрын
@@Владислав-ы9м5у it only is if you heat it up too much or if you use metal cutlery to scrap out food of it
@Владислав-ы9м5у2 жыл бұрын
@@magicmerls291 have you ever heard of using oil?
@magicmerls2912 жыл бұрын
@@Владислав-ы9м5у why don't do both?
@keyk20403 жыл бұрын
it is surprising how many cool things can happen with a "little" bug but this is so interesting great work
@VeganSemihCyprus333 жыл бұрын
A single change can lead to huge differences, check out this new documentary to see the big picture ------> The Connections (2021)
@Adomas_B3 жыл бұрын
This is a rare example. 95% of bugs will probably crash your app
@caglarbulgay27513 жыл бұрын
yeah let me google stackoverflow for the answers on my cool little bug "Unexpected indent"
@homeyworkey3 жыл бұрын
@@Adomas_B thats what makes these moments so cool
@WilliumBobCole3 жыл бұрын
you NEED to make an oddly satsfying compilation of this or something, its mesmerising, how does this even come to be!?
@anmise3 жыл бұрын
The way they orbit around eachother damn. It's like gravity is being used to repel em
@boyfriend60883 жыл бұрын
When the main goal is to collide them but you end up making them avoid each other
@BobtheHat3 жыл бұрын
fnf boyfriend
@monojitchatterjee31853 жыл бұрын
"Failure"
@animal_gal_adventures98853 жыл бұрын
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.
@craidiefin3 жыл бұрын
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.
@rasmusravnfrost27002 жыл бұрын
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!
@huhneat10763 жыл бұрын
Every time I try to watch this video I get this cool loading screen with green circles instead
@ThinkTank2552 жыл бұрын
I literally used to make these exact simulations with these exact bugs in QBASIC 30 years ago.
@MrBaoomTheFirst3 жыл бұрын
Nobody: The protagonist in an action movie during the shoot out: 2:03
@alsiredwood56423 жыл бұрын
Ga h , just what i was gonna put :oo
@sallanta_3 жыл бұрын
Narrowly avoiding everything? Sounds about right.
@forvergone47843 жыл бұрын
I feel like this is gonna be one of those videos that just... Keep showing up in people's recommended forever and ever lol
@furinick3 жыл бұрын
Yeah like that buzzfeed video on candy trading on Halloween, idk why i get that every year in july
@krisztinatooth75673 жыл бұрын
Let's hope!
@TheQuilavaQueen3 жыл бұрын
2:25 Humanity somehow surviving 2020
@dwarfofculture41352 жыл бұрын
1:15 This little one is dodging for his life
@mon4d3 жыл бұрын
I came here to quickly watch the results of a weird bug but what I got was 1h of reading through a thread of 2 guys forming a love-hate friendship over physics discussions. And all thanks to the yt algorithm. If I‘d have wanted to find this I wouldn‘t have... Thanks universe and thanks entropy!
@ForgotMyStupidName3 жыл бұрын
Totally just nerd sniped me. Whose side were you on? :D
@mon4d3 жыл бұрын
@@ForgotMyStupidName I just love them both ❤️😂
@ForgotMyStupidName3 жыл бұрын
@@mon4d I was more on emptyptr's side tbh. Far more likeable and honest approach to the whole discussion. Also the way he capitalizes words and writes "flat earthler" instead of "flat earther" gave me the impression he's German, so bonus sympathy points, haha.
@mon4d3 жыл бұрын
@@ForgotMyStupidName Maybe it’s more a question of who is the protagonist and who is the antagonist in the whole thing. Because clearly emptyptr was the more friendly and also innocent one, so I would say he is the actual protagonist on his quest to bring justice to the comment section. Tbh, Ilari was the hidden hero though. Randomly coming back, talking about the actual source code, even doing some experiments with it!
@phenix24033 жыл бұрын
Well that was entertaining
@davidbarnes66723 жыл бұрын
This is basically a simulation of my anti-social self doing my best to avoid human contact at every turn
@Mandor33 жыл бұрын
Me, when I walk with my dog
@esatd343 жыл бұрын
And being extremely good at it
@Rick-ty9ky3 жыл бұрын
@@Mandor3 Lol, can relate.
@Mandor33 жыл бұрын
@@marvinkohrt9581 uh no
@TheScreeb3 жыл бұрын
Wow, awesome bug! This is so satisfying to watch. And I agree - no idea how you'd actually *try* to do this!
@skya68633 жыл бұрын
@Ezequiel Ciamparella nah just make it so that each collision is perfectly elastic, i think this behaviour would emerge Nvm i think they would just keep bouncing randomly
@jenkathefridge39332 жыл бұрын
2:13 when your the main character in a zombie movie
@Tobo33703 жыл бұрын
Next week : "I have created an entire solar system and life by a nice bug"
@alexisp-c3793 жыл бұрын
Maybe our universe is only a bug in a simulation
@Tobo33703 жыл бұрын
@@alexisp-c379 This is the way
@orctrihar3 жыл бұрын
@@alexisp-c379 That a possibility and why I love the butterfly effect
@FredGlt3 жыл бұрын
The matrix all started with a bug
@orctrihar3 жыл бұрын
@@FredGlt Well, don't have watched the lore of Matrix for now but that a possibility
@joejoemyo3 жыл бұрын
I believe this is similar to planets clearing their orbits, except when planets collide they usually do a bit more than bounce into a different orbit. Less of a bug, more of a phenomenon
@personrbx41793 жыл бұрын
The way the spheres so perfectly avoid each other is mesmerizing.
@jimturpin2 жыл бұрын
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.
@random60333 жыл бұрын
this is the best bug ever bugs in my stuff be like: "Segmentation fault (Core dumped)" or... "YOU FORGOT A FUCKING SEMICOLON"
@darltrash3 жыл бұрын
Those arent bugs tho
@random60333 жыл бұрын
@@darltrash ye, errors... but i wanted it to fit video title
@darltrash3 жыл бұрын
@@random6033 makes sense
@RoboticusMusic3 жыл бұрын
Tesla should implement this into their upcoming rickshaw models in India.
@zyugyzarc3 жыл бұрын
ah yes, autorickshaws
@thisflyingpotato42273 жыл бұрын
Underrated comment right here
@JoakimKanon3 жыл бұрын
70th like. Sorry.
@improcrastinating80633 жыл бұрын
Introducing: the model R (ickshaw). By Tesla.
@RoboticusMusic3 жыл бұрын
@@improcrastinating8063 I'M A PICKLE HYPERDIMENSIONAL ANTI-NEWTON'S CRADLE RICKSHAW, MORTY!
@bonkas63 жыл бұрын
Glad I found this again, I was struggling for half an hour to find this
@acidxero2 жыл бұрын
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.
@rfxsrrno25163 жыл бұрын
Dude, I'm studying particles right now and was trying to picture how chaotic it its, it would be awesome to have this on 3d Cool accident
@TheRealAnsontp3 жыл бұрын
This bug... this bug is something that could get you into some famous colleges for this unique characteristics- you could ask mathematicians to figure out how this is even possible! They would illicit so many responses- Your bugged program could become famous!
@WhatIsMyPorpoise3 жыл бұрын
...or it could be a straightforward example of some law of physics in a closed environment
@cactuscraze48773 жыл бұрын
@@WhatIsMyPorpoise probably this tbh
@EnergiaRocket3 жыл бұрын
2:04 me shooting at other players in video games
@OrangeC73 жыл бұрын
HOW IN THE WORLD DID I MISS ALL OF THOSE - You, probably
@fuzz12523 жыл бұрын
@@OrangeC7 the answer is my pc lag ping or a hacker
@darwinnexus69253 жыл бұрын
Lag, Ping, Cheaters, Shaky Hands, Monitor Turned Off Randomly, Windows Update Pop Up, Accidental AltF4, Brain Lag, Oriolois Farmonden Acumuladum Disabled, Tendromechiometric Defrangentanglement Of The Internal System Of Hatropentratum, Detrohavolentiopendletact Caused Fertadelopadoteagovelten Of Your Revampocelarnatianframatic Harnamentolengofunction To Candotendromentalidalinopagle... I Hate When These Happen >:(
@fuzz12523 жыл бұрын
@@darwinnexus6925 same and nuclear fallout
@ronaldiplodicus2 жыл бұрын
Following one specific green circle is so satisfying, I love it.
@deltactarchives13283 жыл бұрын
No clearance, perfect precision. This is developer satisfaction at it's finest.
@TheEvilCheesecake2 жыл бұрын
*its
@haroldlindley66203 жыл бұрын
This really puts into perspective how easily something like a solar system can form, where the objects never collide. It's just random chance and a very long time scale.
@geli95us2 жыл бұрын
This doesn't happen in real life btw, it's a consequence of handling collisions wrong. the reason solar systems with objects that don't collide form is that: 1) they are usually created from a rotating disk (so not a lot of irregular orbits) 2) a planet is by definition big enough to clear its own orbit
@haroldlindley66202 жыл бұрын
@@geli95us you completely missed the point if what I said, but go off I guess
@geli95us2 жыл бұрын
@@haroldlindley6620 I didn't, this simulation has a bug, in real life, those bodies would collide and form a single body, and they would never form a solar system. I doubt one can make a point by loking at something that is wrong, and if you think you can, I'd like to hear what that point was
@haroldlindley66202 жыл бұрын
@@geli95us the point is the randomness of it all. Not how it aligns to nature. Because the bug, like the laws of nature, are inherently random. In real life, the bodies would collide, but they would also shatter in the process, and through many millions of years, these shattered pieces would eventually orbit the main body, but never in a truly stable sense, since nothing in nature is stable.
@geli95us2 жыл бұрын
@@haroldlindley6620 No, the bodies would shatter and form a big body in the middle, the fragments wouldn't have enough energy to orbit, the reason systems form in real life is that they are already spinning when they form plus, are you trying to say that the randomness (not really random, since they are caused by humans) of bugs in computer code works the same way as the randomness in the laws of nature? following that logic I could say that the sun is an apple because both are round What you are saying doesn't give any information about the universe, save for, maybe, that humans are unreasonably good at finding patterns in unrelated phenomenons
@firstdev16533 жыл бұрын
That is so inspiring, now I'm gonna start writing random codes until I invent something awesome like this.
@oyunlarveparodiler32213 жыл бұрын
Did you find anything yet?
@davidwarford30873 жыл бұрын
As you can see, this occurs when your only handle depenetration. for (uint32_t i(0); i
@oyunlarveparodiler32213 жыл бұрын
@@davidwarford3087 Is this c plus plsu
@albingrahn55762 жыл бұрын
you wanted to make a collision system, but you managed to make a system that somehow never collide. amazing
@MTweedC43 жыл бұрын
1:10 Me dodging my responsibilities
@JakeMiller20203 жыл бұрын
This would make for such a cool D&D galaxy, or as an explanation for how different planes are sometimes near one another without ever colliding. So cool, thanks for the upload!
@kimitsudesu3 жыл бұрын
oh, I initially thought the objects are interacting with each other through a force of attraction, like gravity. that assumtion made the result look kind of groundbreaking :) now i see they are only attracted by the center point, which is still neat.
@Blue-Maned_Hawk2 жыл бұрын
The precision of the timing in the orbits is incredible. Saved to goog
@Wizartti3 жыл бұрын
Alternative title: Minecraft xp balls not touching each other for three minutes straight
@MrC0MPUT3R3 жыл бұрын
_Stackoverflow:_ Weird bug causes creation of ancestor simulation? _This question was marked as duplicate._
@Agnes.Nutter3 жыл бұрын
I literally had a :D face for 2/3 of this video, thank you for this happiness! ^^
@BotchHR2 жыл бұрын
Yooo this is like one of those satisfying videos, where everything fits perfectly
@michailchalkiadakis963 жыл бұрын
have you ever considered making educational analysis on your work?Maybe an advanced tutorial for c++?Good job anyway!
@PezzzasWork3 жыл бұрын
Yes I am considering this, there seems to be a demand for it
@Herisson1233 жыл бұрын
@@PezzzasWork It would be awesome !
@lmpstudio23213 жыл бұрын
@@PezzzasWork cool
@MWMWMWMWMWMWMWMMWMMWMMWMWMMWMW3 жыл бұрын
@@PezzzasWork please do this
@irfanjames3 жыл бұрын
@@PezzzasWork Please do it
@vincentpollack3 жыл бұрын
There are no mistakes, just happy little accidents :)
@Antoncgabriel3 жыл бұрын
2:34 Me, as the last team member in the game, playing dodgeballs in middle school.
@twntsvn3 жыл бұрын
.imagine our solar system working like that, every planet passing by at scaring close distance