Full version of the song: ua-cam.com/video/MVsiOKTaCdw/v-deo.html Visuals inspired by @Numberphile, ua-cam.com/video/6z4qRhpBIyA/v-deo.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]))
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.
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 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.
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.
@@ethanwessel3911They didn't. That's the whole point. A very very small change has drastic changes in the output of the function. Google the concept of Chaos theory. It's a fun wiki read if you're an armchair mathematician :)
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.
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.
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.
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.
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
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
@@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
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.
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?
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.
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 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
@@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).
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.
Full version of the song: ua-cam.com/video/MVsiOKTaCdw/v-deo.html
Visuals inspired by @Numberphile, ua-cam.com/video/6z4qRhpBIyA/v-deo.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: ua-cam.com/video/7G4kfVAznGA/v-deo.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
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
A wallpaper based on this idea that has a random number of balls drop at a random area would be so fun.
@Verglas Curve Oh, yeah. True.
@Graviton Lance 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
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
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.
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
…
🎺🌚
2:13 looks like fireworks
0:53 really hits hard
2:06
Wow, that‘s so beautiful!
bruh, thats gay
@@zeynaviegas 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
Very nice one ! I should not have missed that numberphile video
2:07
*ultimate satisfaction*
🏳️🌈🏳️🌈
This is wonderful! Do know that your content is very much appreciated!
Thanks - very glad to hear that!
Beautiful! Not just a great visualization but the music is sensational.
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?
@@sachin_4154that was my exact thoughts. If this is a computer simulation every ball should have always taken the same path Everytime.
@@sachin_4154 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.
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
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
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.
Me too. I thought they were going to affect each other.
@@lumiliMCI think they did start at the exact same point, so why do they have different paths if their historical trajectories are exactly the same?
@@ethanwessel3911They didn't. That's the whole point. A very very small change has drastic changes in the output of the function. Google the concept of Chaos theory. It's a fun wiki read if you're an armchair mathematician :)
Reminds me of old Algodoo marble races.
Probably the most visually soothing and beautiful example of temporal chaos I've ever seen.
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.
Then imagine watching it 13.8 billion years later and trying to calculate the age of the system
0:40 this feels like the DVD logo when it perfectly hits the corner
2:12 The fireworks in my backyard during New Year
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.
100 looks like a screensaver
0:12 1 ball
1:06 2 balls
2:13 100 balls
I love how while the 100 balls all take a different path, they still share a bit of synchronization.
I see entropy increasing
0:58 Give me them back please.
lol
No
-👩⚕️
music sounds like something you would hear on an experimental surreal game like wonderrputt, or the floor is jelly and i adore it so much
what i see in tv screens on a tv shop
For a moment there that was incredibly beautiful and I would love to have it as a screensaver
Not only is he the former UFC LHW champion, but he’s a heck of a scientist.
This makes me very happy.
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.
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.
That song brings me all the way back to when I used to watch Baby Einstein
(Not LITTLE Einstien)
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
I love when the 100 balls start dropping in the rainbow effect happems. It is so beautiful and colorful.
its so bizarre how a 0.0000001 radii difference is so major
This here is billion of problems of calculus and calculating in milliseconds
2:09 とても綺麗!
Never understood this, if all the balls are dropped on the same spot how is it possible that they deviate from the calculated path
When you started doing the 100 ball drop, it kind of looked like fireworks. This is so relaxing. I love this.
This is just wonderful. One of the most interesting things I've seen in a while.
2:15 here comes the fireworks
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 :).
Who is that
@@stigcc mixed martial artist
The two balls are like two lovers that have a difficult relationship but still try to stick together
The twisting illusion makes it look 3D
Ahh that makes sense they’re together at the beginning then manually released later
2:07
Teenagers in the 21st century be like.
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
0:54 got me off guard
Mathematics : shows beautiful patterns
Physics: scratches the head why does not the ball loses the energy?😂
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
Me:mom isnt it satisfying
Mom:RAE U TAKING DRUGS!?
thats alot of balls
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.
ive been spiritually touched
The end of the video was visual stimulation for me! ❤
So pretty! Pls do more shapes!
2:10
Its so soothing to look at... Twisting and Turning
This could be my wallpaper
Screensaver.
Small imperfections are just enhanced.
100 balls looks like a screensaver
My man went from fighting Jon Jones to making animations... respect
I was looking for a comment about this LOL
why do i enjoy the music so much
This is such a nice depiction and representation of the butterfly effect
Nothing could’ve prepared me, holy
100 balls version would make a great fireworks show
Like. A perfect demonstration of what dynamical chaos is
This is beautiful. It's like watching a unicorn projectile vomit rainbows.
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.
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.
All of these would make the world's greatest screensaver
This one reminds me of a Windows 3.1 screensaver. I love it!
This is what the molecules look like on top of a freshly poured glass of soda or beer.
The sequence with two balls made me rethink about my lifechoices
Proof of how Random Number Generators work
Someone: *asks something about me*
Me: 1:43
Someone the simulation combined with the music reminds me of that lines simulation in Workbench 1.3 for Amiga.
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
Nice job.
2:09 bounce of the century
2:07
It is the most beautiful thing in the world 🌎
Reminds me of Phun/Algodoo marble tracers used in marble races etc
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).
I don't know what we can learn from this show, but one thing is for sure: it's 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 Wish the Video would Last 5mins more with the 100 balls bouncing everywhere Like a fireworks show
This is the most satisfying video I have ever watched.
I feel like everyone in this comment section is smarter than me
The 2 balls one was an cinematic masterpiece
When it was at 100 balls it looked like a rainbow when it started and we saw the other colors, very cool!
The most elegant ball ive ever seen
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 watched this like how a cat watches lasers. So cool!