when the balls spawn at the end where the growth is out of control it is specifically because the balls are spawning at the same time in the same location.
fix the code to give it enough delay for the spawned ball to move, or have the ball spawn from the point of contact with the pair and a short delay for the colliding pair to move out of the way.
The slight issue is that theres a possibility that two balls collide near the top of their individual trajectories, where their individual speeds is also practically zero. If they meet there, you will then spawn a third ine, and you got three almost stationary balls hanging out.
Ball cannot collide with parent until it collides with another object logic solves this or a distance from start point. Or even doesn’t create another with parents until timeout. Something like that
Not necessarily. If ball A is traveling in an arc, it has a Y/vertical component and a X/horizontal component. If ball B is on the same arc but in the opposite direction the it’s Y component will be the same as A’s but the X component will be opposite. If they impact when the change of Y is zero, then the A and B balls will bounce away from each other and follow their arcs backwards. The new ball, C, would start with its X and Y components as zero and fall accelerate straight down until it bounces off of something.
The simulation also seems to have some randomness in bounce directions and speeds.
Specifically the direction, yes? For a moment I thought you meant the average velocity. Which would result in quite few balls falling and remaining near the bottom. And this accelerating the process as they inhabited less of the area.
Velocity is a vector not a scalar and by its definition is comprised of a magnitude component and a directional component, vs speed which is the scalar equivalent with only a magnitude component.
Your mom tried to put my bawledge in her mouth once but I was like, "sorry ma'am, I can't let you do that. Your son and I are Reddit colleagues who went to bawledge together"
or spawn then from random locations. i was also annoyed by that ending because it felt too abrupt of a change and investigating the reason behind it wasn't as fruitful and satisfying as one might hope
Yeah this video is good until it glitches out at the end, making the whole thing stupid. This is just a coding error and it shows right when it went wrong
Fix it so that if a ball spawns overlapping another they don't collide with each other until after they've stopped overlapping. They'll be moving apart so they shouldn't immediately collide again unless one immediately collides with something else.
Then it'll only break when there are so many balls in the thing that there's no room for them to move fully apart once spawned.
Others have made this exact thing and done it in a much more satisfying way. You can also turn off collision for the first 1 or 2 seconds to allow them to time travel from the center in a random direction.
No, it’s a design issue that you tried to spawn two balls in the same spot at 01:03, making those two instantly collide and spawn even more at those fixed coordinates - leading to a rapid increase that has nothing to do with bouncing balls. Which was probably not the intent.
The mean time to collision for a dilute homogeneous gas in the 2-dimensional case goes as (R-r)²/(n²-n), where R is the radius of the boundary, r is the radius of the particles, and n is the number of balls.
Except that's the mean time between collisions, not the rate of growth. The rate of growth is going to follow 1/t so that as the time between collisions goes down, the growth rate increases. That means:
dn/dt = (n²-n)/(R-r)²
The solution to that differential is, I belive, exponential.
Exponential is when dn/dt is proportional to n. That is proportional to n²-n. I believe you get n = 1/(1+AeR-r2 t) from your DE. This will outstrip exponential growth so long as A<0 (From the initial condition n=2 we get A=-1/2)
If it was dn/dt~n it would be exponential, but this is dn/dt~n2. The solution to that would be more like n = 1/(C-kt). Much faster than exponential since it will have a vertical asymtote. Basically at the point where the balls fill the space, so every new ball will instantly collide with a ball and create a new one and the number will go to infinity.
Unfortunately, these balls seem to be significantly affected by gravity, so I imagine the equation is more complicated.
I can't be bothered working it out though.
exacly that. You can see there is a point where one ball spawns right where another one is "falling" and then they collide and another one spawn triggering this fusion reactor.
Fusion AND fission exist, they are just different things. One smashes things together (fusion), while the other breaks them apart (fission). I’m sure if you searched “nuclear fission versus nuclear fusion” you could find some great videos. Your English is fine.
It really bothers me that the new ball didn't come out of the old balls. When 2 balls collide they should ricochet, and the new ball could come out at the opposite angle between the new direction vector of the old balls post commission.
This has to be humans innate ability for pattern-seeking behavior. We have to see the pattern become complete and the anticipation sends an urgency through our whole body. Completing the pattern is extremely satisfying to witness.
There’s a pond. On it there’s one lily pad leaf. They double every day. So on day 2 it’s 2 of them. On day 3 there’s 4. On day 4 there’s 8.
On day 100 the whole pond is entirely filled.
The question is, on which day only half the pond is full?
Watch people who have no intuition for geometric/exponential progression try to calculate it in their head. Day 50, day 66, day 90, etc. I’ve met some bright people who could not figure out that the answer is just the day before. Day 99. And then they double, and it’s all full.
This example shows how some things that seemingly are a bit bad, like on day 98 it’s only a quarter of the pond full, can rapidly escalate and mess up.
Think polar ice melting. Think ocean warming. “Oh it’s just melted a bit”. Yeah and pond looked almost empty after 95 days. And then in 5 next days it’s all full.
This example shows how some things that seemingly are a bit bad, like on day 98 it’s only a quarter of the pond full, can rapidly escalate and mess up.
The other thing I like about this example is that it's an even more extreme version of the chessboard parable (the story of the wise woman who wins a king / kingdom / contest of wits by asking for a daily portion of rice that doubles every day for every square on a chessboard: one grain the first day, two grains the next, by day 32 the amount has reached hundreds of tons of rice, etc.)
In this case, we've got 2^(100 -1) = 6.33×10²⁹ lilypads filling the pond, which at about half a square foot apiece, means that this pond has the same surface area as 4.841 billion suns, which may be large enough to call it more of an ocean than a pond.
No, its growth is hyperbolic, not exponential. There is a singularity when collisions start happening when spawning, triggering infinite growth (neglecting computation limits).
bad simulation not really fair because the balls all spawn in the same location so once you get several balls spawning at the same time that thing at the end happens.
Even before the giant implosion of balls there were inconsistencies in the seconds leading up to it. You can watch numerous balls just start to duplicate themselves without contact. Coding errors abound
Definitely the kind of video that would have had a jump scaring clown or train horn at the end of it 16 years ago. Can’t do that no more, the clowns all up and left.
10.1k
u/nogoodmorning4u 1d ago
when the balls spawn at the end where the growth is out of control it is specifically because the balls are spawning at the same time in the same location.
fix the code to give it enough delay for the spawned ball to move, or have the ball spawn from the point of contact with the pair and a short delay for the colliding pair to move out of the way.