Butterfly effect in a circle
Vložit
- čas přidán 14. 10. 2021
- Balls falling under gravity in a circle is another example of a chaotic system, sometimes referred to as the butterfly effect.
@gpcbass reproduced the absolutely brilliant composition "Jesus bleibet meine Freude", originally made by J S Bach almost 300 years ago. A full version can be found here • Fender Jazz Bass 1962 ... and here • Jesus, bleibet meine F... .
Further details:
1. One ball in a circle having radius R
2. Two balls separated by 0.01*R
3. 100 balls, each pair being separated by 1e-6*R.
Done in Python and FFmpeg. SymPy was used to solve some equations.
Visuals inspired by @Numberphile, • Chaotic Balls (and oth... - Věda a technologie
Full version of the song: czcams.com/video/MVsiOKTaCdw/video.html
Visuals inspired by @Numberphile, czcams.com/video/6z4qRhpBIyA/video.html
Stripped Python code below. Create a .py file and paste the code therein. Don't forget to create your "DestDir" folder in same directory. (There are much neater scripts elsewhere on the web on this topic. Analytical solutions in Python are not my strong suit...)
***
import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as N
from scipy import interpolate
from sympy import N as symN
from sympy.solvers import solve
from sympy import sqrt,atan,sin,cos,Symbol,re,im,diff
import scipy.linalg as SLA
def mm(* args):
tmp=N.dot(args[0],args[1])
for ii in range(len(args)-2):
tmp=N.dot(tmp,args[ii+2])
return tmp
def myangle(xp1,yp1):
if xp1xp0:
ivec[0] = abs(ivec[0])
ivec[1] = abs(ivec[1])
rvec = (ivec-mm(2*mm(ivec,nvec),nvec))
rvec = N.array([float(rvec[0]),float(rvec[1])])
rvec = rvec/SLA.norm(rvec)
v0 = v0*rvec
vx = v0[0]
vy0 = v0[1]
x = Symbol('x')
sol = solve(x**2 + (vy0/vx*(x-xp1)-g/2/vx**2*(x-xp1)**2+yp1)**2 - 1,x)
for ii in range(len(sol)):
if abs(re(sol[ii])-xp1)>1e-8 and abs(im(sol[ii]))
Holy shit that's a lotta code
@@Idiot354 nah
0:06 0:07 0:08 0:08 0:08 0:09
Now like 3blue1brown i imagine if we can color all initial position according to final position after X seconds and see if it's a fractal.
Hello, Thanks for an interesting comment! I made a video closely related to your thoughts: czcams.com/video/7G4kfVAznGA/video.html
There is no fractal here
@@Medvedev_Dmitriy I feel like you didn't read OP's comment properly, nor watch the video linked by the creator
@@Medvedev_Dmitriy you've made the proposed simulation? Please share. Or share argument that this cannot be fractal.
I feel like you will get a lot of noise
A wallpaper based on this idea that has a random number of balls drop at a random area would be so fun.
@@wish-keeper Oh, yeah. True.
@@wish-keeper could be recorder tho
This existed for Linux in 1994.
If it was made so that another one is added at each tap, that would be more cool
wow 2:14
Idk why but the one with the two balls + this choice of music, just feels so serene, like two siblings reminiscing about playing in a field together
i like how everyone is having a sentimental experience when it’s just two circles bouncing around
@@dwolly4453 I am very hunger
💀
If I was with my younger brother, we wouldn't be playing around like the two balls. We'd argue face to face with NO peace and NO mercy.
Omg yes right?? So strange
I love how it's synchronous with the music especially in the 100 balls
That's because so many balls are hitting at so many different intervals that they line up with the music metronome.
*synchronises
@@daniellaizekemoe1967synchronous is the correct usage though
that's 50 men
Basically 50 men ok
Wow- those 10 seconds after 2:06 is just phenomenal. The whole thing is acting like a wave or something, its gorgeous!!!!❤
literally. i gasped. i know it sounds silly but those 10 seconds made me feel really emotional
Oh my big g
it gives windows screensaver vibes
and then like fireworks
Exactly
I almost laughed uncontrollably when it said “2 balls” on the screen. I might be broken beyond repair
Don't worry pal... I laughed too... I guess we can't be fixed
same
Lmao
…
🎺🌚
The last example is a great way to show the domain and range of a function. There's lots of small paths that they can take, but it is all bounded to the semicircular area.
1:26
Also shows that, even when so much else has changed, they can still end up in the same place, if only for a moment.
2:13 looks like fireworks
2:07
*ultimate satisfaction*
🏳️🌈🏳️🌈
0:53 really hits hard
2:06
Wow, that‘s so beautiful!
bruh, thats gay
@@zeynaviegas5043 i am surprised that some people still use gay as un insult
🙄
@@Lotschi yeah...
@@Lotschi yeah, very gays
it is! sadly we as a society butchered the idea of a rainbow and use something naturally beautiful that exemplifies physics in order to push a political agenda. #FeelsBadMan
For those wondering, the trajectories of the balls after hitting the circle are calculated by using the fact that the angle of incidence equals the angle of reflection. The angles are measured by taking the tangent lines of the ball's path and the surface at the point of contact. Between bounces the trajectories are parabolic arcs because we are assuming uniform gravity.
But how does their trajectory changes when their angle of incidence and angle reflection are same in the beginning?
@@sachinnishad4154that was my exact thoughts. If this is a computer simulation every ball should have always taken the same path Everytime.
@@sachinnishad4154 It's not, they are very very slightly different.
But why? They're not in collision with each other, so the entropy of the system should be the same whether you have 1 or 100 no?
It's like they're in different phase, so it shouldn't matter.
@@ethanwessel3911 Check the description, they are not all in the same place.
This is very cool but it’s not what I expected based on my perceived knowledge of the Butterfly Effect. To me, I was expecting the balls to be able to interact with each other causing them to collide and move off in extremely different directions. That was my understanding of the butterfly effect. This is simply creating cool patterns by having the objects start from slightly different points in the beginning
That's the point, 1 slight change in the past can alter the future in a drastic way. Let's say in the 2 ball example, white is our time period while red is another where cars weren't invented until a day later, a LOT of things would be different from our reality.
Every one of the 100 balls dropped from almost the exact same point in space. And yet the tiniest fluctuations to spread all the balls out by end. That's the effect.
They all started at almost the same point, but hit the first wall at a slightly different angle because of the curve, which became more and more significant of a difference over time
Me too. I thought they were going to affect each other.
@@simplyatableI think they did start at the exact same point, so why do they have different paths if their historical trajectories are exactly the same?
100 Balls is what I imagine when I think of any other person also born on November 17th, 1999.
All having the same experience as a newborn but, as our environment shapes who we become, we have all taken different paths. Some with similar experiences but no two ever the same.
This is the butterfly effect. Every small decision we've taken, has driven us further apart from some yet closer to others, in a quite mesmerizing way.
0:58 Give me them back please.
lol
No
-👩⚕️
Very nice one ! I should not have missed that numberphile video
with the two balls it makes me think its a couple dancing together alone but they are having so much fun. plus with the music it makes it much better
Beautiful! Not just a great visualization but the music is sensational.
Probably the most visually soothing and beautiful example of temporal chaos I've ever seen.
The Butterfly Effect seams really useful if you eg. want to exhaustively search an entire space, but don't really care about efficiency, or somehow can't optimize the search.
there's zomething fascinating about thatr moment at 2:05 where the 100 balls are mostly in sync, traveling in the same direction in the same order, and then just happen to hit a particular angle/segment of the sphere to make all their paths cross and spread out a ton more. they very quickly start to seem random and disorganized. It's like a turning point where order suddenly turns into chaos.
2:12 The fireworks in my backyard during New Year
I love how while the 100 balls all take a different path, they still share a bit of synchronization.
This is wonderful! Do know that your content is very much appreciated!
Thanks - very glad to hear that!
You're video really inspired me to try this too!
I love simulations like that!
He is NOT “video really inspired”. It’s just a simulation
@@lsfornells ???
@@Y_Creator Exactly. Bad grammar from English only SPEAKER making the comment unintelligible
I see entropy increasing
0:12 1 ball
1:06 2 balls
2:13 100 balls
I love when the 100 balls start dropping in the rainbow effect happems. It is so beautiful and colorful.
0:40 this feels like the DVD logo when it perfectly hits the corner
So pretty! Pls do more shapes!
It feels like a soft dance . With dancers performing in coordination and seperately
its so bizarre how a 0.0000001 radii difference is so major
100 balls looks like a 3d rainbow at first but later it creates a mess
Now imagine if one of these balls were a meteor holding elements capable of kickstarting life on a planet, and a small change alters whether or not it lands on a planet capable of housing life.
For a moment there that was incredibly beautiful and I would love to have it as a screensaver
I'm a little confused. What causes them to separate? Are they not truly in the exact same position to start?
The posted gave the Python code. The balls do not start with literally identical initial positions. There is a small deviation.
@@tedkostek100 I don't know how I missed these notes in the description:
"2. Two balls separated by 0.01*R
3. 100 balls, each pair being separated by 1e-6*R."
But thanks for satisfying my curiosity, haha
Was just searching for this
Not only is he the former UFC LHW champion, but he’s a heck of a scientist.
I imagine this must be how timelines and how one change can completely change the future would be. The ball can bounce slightly different then the other balls even though they all started the same way. Each bounce has is like a choice being made and the chances it bounces one way versus another can highlight how a person has multiple choices in each scenario and this shows how slight changes in “choices” can have a vastly different outcome in the future. Or am I doing to many drugs lmao
My man went from fighting Jon Jones to making animations... respect
what i see in tv screens on a tv shop
The twisting illusion makes it look 3D
Small imperfections are just enhanced.
This is what the molecules look like on top of a freshly poured glass of soda or beer.
Ahh that makes sense they’re together at the beginning then manually released later
This is such a nice depiction and representation of the butterfly effect
Reminds me of old Algodoo marble races.
2:09 とても綺麗!
The conclusion is that no matter what you do, you always end up at the bottom
The sequence with two balls made me rethink about my lifechoices
It must be in a vacuum and with 100% elasticity because each ball does not seem to be wasting any energy at all.
Correct. The animation is purely theoretical.
I feel its symbolic that there will always be ups and downs for everybody, so dont judge your position compared to someone they started from the same place as you
The 100 ball reminds me of a national holiday (4th of July, Canada day, Bastille Day, etc) and going outside in the cool summer breeze to see a fireworks show
This is just wonderful. One of the most interesting things I've seen in a while.
Proof of how Random Number Generators work
The two balls are like two lovers that have a difficult relationship but still try to stick together
When you started doing the 100 ball drop, it kind of looked like fireworks. This is so relaxing. I love this.
That song brings me all the way back to when I used to watch Baby Einstein
(Not LITTLE Einstien)
2:12
I thought the 1 ball simulation was taking a while to spread out, I did not know it was just one ball!
Sorry for bad english
Sorry for the disappointing cliffhanger :). I needed to stretch out the video a bit to cover most of the song. Plus I'm myself embarrassingly entertained by just watching a ball bouncing back and forth.
@@animations_ag embarrassingly? No lol it’s normal… XD
This makes me very happy.
U know what confuses me, when there’s two balls why wouldn’t they just fall in sync when they fall at the same time but when it got to 100 balls it was so mesmerizing for a second
2:07
It is the most beautiful thing in the world 🌎
Mathematics : shows beautiful patterns
Physics: scratches the head why does not the ball loses the energy?😂
Like. A perfect demonstration of what dynamical chaos is
I think this is a great way to get an explanation why mathematical simulation for weather or germ spread do not work for long term prediction.
After a while even some minor influence will take over on some variables, so the prediction rate decreases drastically at a certain point, after this point no model will deliver a result you can relay on!
It´s getting worse when you raise the amount of variables ( balls in this case ), so the tilting point takes over after few iterations.
This is beautiful. It's like watching a unicorn projectile vomit rainbows.
I'm seeing 3D when they spread
Me:mom isnt it satisfying
Mom:RAE U TAKING DRUGS!?
To quote Anchorman:
"Boy, that escalated quickly!"
Reminds me of Phun/Algodoo marble tracers used in marble races etc
I watched this like how a cat watches lasers. So cool!
I Wish the Video would Last 5mins more with the 100 balls bouncing everywhere Like a fireworks show
Note that this effect wont occur if u throw the ball exactly at the bottom of a circle throygh which the velocity vector passes through.
100 balls look like a rain bow
The end of the video was visual stimulation for me! ❤
Animadores: cuántas bolitas querés en el vídeo
El youtuber: si
The 100 balls one,so satisfying and beautiful
Especially the rainbow that shows up on it so beautiful 🤩
Please run it with an additionaly function.
When two balls separete from a certain distance, seed in an intermediate ball what it's variables interploatly inherit it's parents velocityes an positions.
This way you will dinamically simulate battlefly effect more accuratly with saving so much calculation, and you will not be limmited by the resoulution what you set at the starting point of the simulation.
i only clicked on this because your name is alexander gustafsson. why is no one talking about this
That has been mentioned "a couple of times" in comment sections of my videos :).
And this is why meteorologists can't predict the weather very far in advance. It's mathematically impossible.
So, this is what happened to my life, just constant changes in the little moments spread throughout the years, creating branching timelines in the tunnels of time. Just a small change in the decision making could significantly avert the whole course of my life, and so here I am now, living the life of a failure, while maybe some other versions of me in parallel universes have better courses of life.
I was watching as was just thinking what if you were to graph the distance between the red and white balls. Would it slowly move apart, would it form an interesting pattern?
Also what would happen if you averaged the coordinates of all the points and drew that? how would it move around as the system evolved? Would it slowly jump around more and more violently? Would it fallow a pattern?
oh, very interesting thoughts!
My guess is that the average will 'slow down' after the start where it follows the path of all of them
Sounds like something to try out :). Regarding your first thought, I suspect that the distance will, on average, increase exponentially like for other chaotic systems.
2:18 Interesting how they all reach the same height, which is also the height from which they were dropped.
Very beautiful and unexpected. What about in a cylinder? Great job. Thank you.
ive been spiritually touched
Someone: *asks something about me*
Me: 1:43
I imagine watching this while high would be tremendously rewarding
This video smells like rubber and the music reminds me of my first childhood fear.
2:10
Its so soothing to look at... Twisting and Turning
given infinite time maybe it will all return to its original position? This video was very pretty thank you for making it! :)
Given infinite time, it will
It could, but it's probability 0.
@@Dexuz really?
Yes, maybe. But I think the probability is like bogo sort, which is throwing at random direction
@@soumickdas9674 think about the simplified case with no gravity - if the angle the ball makes with the circle is a rational fraction of a circle, then after tracing out a star polygon it will return to its original state, but if the fraction is irrational, it will never complete an integer number of rotations and thus never return to its original state. adding in gravity only makes it harder for the system to perfectly return to an earlier state because there’s more chaos (in the precise mathematical sense).
The 2 balls one was an cinematic masterpiece
oh so thats how they made those old mac screensavers
Someone the simulation combined with the music reminds me of that lines simulation in Workbench 1.3 for Amiga.
This look like a species that use to be the same until they evolved differently, into a completely different species that can be a cousin or a ancestors
I don't know what we can learn from this show, but one thing is for sure: it's beautiful!! ❤️
100 balls version would make a great fireworks show
Nothing could’ve prepared me, holy
0:54 got me off guard