Hi I'm Matt Henderson and I like making
mathematical animations;
and recently I got a bit into making
animations that demonstrate chaos theory.
So today I wanted to show a few chaos
theory animations.
This one is Bouncing Balls and it's a
very simple system that
demonstrates chaos theory. So what we have is
actually two
balls - you'll start to see it's two
balls once their paths diverge.
After just a few bounces they're going
on totally different
chaotic paths. At the beginning we've got-
they're on they're almost on the same
path-
(Brady: Almost-) - They start off um right next to
each other,
their initial positions are
equal up to the fourth decimal place. And
the point is like one of the hallmarks of
chaos is that there's this high
sensitivity to initial conditions where,
you know, even if it's four decimal
places off, the the
difference between the two is
exponential over time until they are
just
on totally different paths as it seems.
This one is the key bounce really, yeah.
When I posted this I kind of posed a
question, you know, isn't it surprising
that such a simple system is chaotic? And
of course the answer is no because
simple and chaotic aren't,
like, opposites of each other. When I think of
chaos maybe I think of the weather, you
know, the butterfly effect.
And that is a massively complex system
and that exhibits chaos;
but it's not because it's complex that
it exhibits chaos, it's some more
fundamental thing about the,
you know, the non-linearity of the
differential equations or something like that.
This is in Mathematica again. it's
actually quite a simple piece of code that is basically
solving
the differential equation. We've got
four
equations, I could write them down as
well. The way it's written in the code
is like this, so y dash dash of t
equals minus g. So
the second derivative of the y position
is a function of t and that is minus g
which is the
gravitational constant. That's pretty
obvious right? Like the-
how much something is accelerating down
is just due to gravity.
(So you're using the proper Earth's)
(gravity as your number there in the in)
(the animation?)
Yeah but I mean it doesn't really matter
because there's no
scale keys it's just some abstract circle in
space but I could-
it happens to be like one metre wider
I think, or the radius would be one metre
but you know. I just have- I did put
in 9.81
as that number. And then we have a
similar one for x:
this is to say that there's no
acceleration
left and right. These ones are just the
initial conditions here, these last four here.
So we'll have- we basically have that x
and y
start off at x0
and y0 which we will plug in. One ball
will have
a slightly different initial x0 than the
other ball does.
And then the other one is just to say
that they start off
stationary; so this is you know the
derivatives
start off at (0,0). The speed
in the x direction is zero, speed in the
y direction is zero at the beginning.
So there's this there's this um sneaky
bit in here,
so this is saying when it happens that x
squared plus y squared equals 1,
which is the equation of the circle, then
I'm going to
change the derivative of x and y into
the reflected values. Essentially now
Mathematica is going to take this
set of equations, it's going to look out
for that crossing point on the circle,
and reflect the speeds. So I'm plugging
in
x and y, so this is the first ball, x is
.001
just off the centre and y is 0.5.
And then for the second ball it's .0012,
so it differs in the fourth decimal
place. That's a
horizontal difference, so the x's are
left and right.
So if you run this code, now what it's
done is it's computed
what these x and y positions are.
So if I- if if I want to just sort of
visualise those
that's what one of the balls' paths looks
like. And if I want to
plot the other one, you know, change this
to xf2,
yf2. So this is the whole solution.
(So before you ever saw the animation you)
(saw this?)
Yeah that's right. Yeah. - (That's a spoiler!)
Yeah! I mean before I saw this I saw a
whole bunch of like
red boxes saying 'you got your code wrong';
and maybe I saw a few where it didn't
detect the circle properly or the
reflection was wrong.
This one is another simple yet chaotic
system. This one is highlighting the
difference between
something that isn't chaotic and then
just a subtle change
that suddenly makes it chaotic. So here
we have two
pool tables, one with perfectly straight
edges and one that has
walls that are slightly curved. Now
the balls all start moving off
together in a group; and the balls aren't going to
interfere with each other, they're just
separate trajectories, modelled completely
independently. - (So they're kind of- the)
(balls are transparent to each other) - Yeah
that's right. Obviously when they hit the wall
they're going to reflect. The pictures look
pretty similar, actually these are nice,
slightly more spread out because of the
sort of like a mirror, a bendy mirror or
like a lens
kind of effect there. - (Are we calling that)
(concave or convex?)
Yeah it should be convex. - (Convex to the table)
(but concave to the outside of the table?)
Yeah I guess everything that's convex is
also concave, depends on your perspective.
And they bounce up here, and now you can
really see that
things have- first of all there are balls
in a different part of the table.
While these are still in a circular
shape that they started off in,
these have nice spread out into more of
an elliptical shape.
Just as with the other bouncing balls
soon they're just all spread out and
chaotic; and you know
if I if you were to see this picture
without the lines
and you were to say, well where did they
start off?
You wouldn't even have a clue right? And
actually
in in a sense it's a fundamental
fact of the mathematics that you would-
you couldn't have a clue because you
you wouldn't be able to measure with
enough precision if you let the time
go on for long enough.
(And the other ones will stay in that)
(circle forever?) - Yeah this is a- you know,
this is obviously a mathematical
idealised pool table. What I wanted to
get at was
what is the simplest change to a system that could
result in chaos? You know, what's
happening is that
these bounces are more complex than
these bounces which are
very linear. These ones are non-linear and they
they start spreading things out. And
there's a whole field of
studying these, they're called billiards
problems,
and you've got different types of
billiards, different
shapes and it's kind of interesting. In a
circle for example,
things are not chaotic and they kind of
keep contracting in and out and bouncing
around the circle.
The other- you know, if you put like a square
in the middle of the circle it
interferes with it and all of a sudden it is chaotic.
(I wonder how long you would have to wait)
(for that to return to a circle just by)
(pure chance.)
There's a theorem that said that, if you
wait long enough, that would happen.
Yeah and obviously there's another point
which is
what would happen in the real world?
Like people when you're playing
pool, you're going to be in a world more
like this than
than this. You're not going to
have perfectly straight edges.
So if you're looking at making a shot,
you want to minimise the number of
bounces that have to go
exactly to your plan, because after you
know one,
two, three, four, five bounces
things are way off trajectory from the
ideal world.
This is a water wheel
that is a model for the Lorenz Attractor
which you might have seen before as this
kind of like butterfly shaped
3D thing that typifies a lot of chaotic
systems.
What we've got is a water wheel with lots of
these buckets that can collect water and we
have water flowing in from the top.
It's not stable, so that when- if you
start filling up the top
bucket then it will start spinning in
whatever direction it's
off by. So here we start filling it and it
starts to spin to the left.
So another aspect of this wheel is that
the buckets are slowly leaking water,
which I haven't animated but
you could imagine it as the water is
evaporating or just disappearing over
time. And there's also a little bit of
friction to the wheel.
These add up to giving a chaotic system
in that the movement of this dot here,
which is the centre of mass of the wheel,
that movement
is chaotic. - (Centre of mass, that's the)
(centre of the mass of the wheel, okay.)
Yeah that's right. And it- I mentioned
it's,
it's related to the Lorenz system.
The Lorenz system has this classic
kind of 3D butterfly
wing shape to it; and this is this is
kind of visible in the trace that the
centre of mass gives out.
Yeah it's kind of a coincidence, well it's a
total coincidence that the butterfly
effect
is some aspect of chaos theory, and that
there's this butterfly wing
shaped attractor that you get in a
bunch of chaotic systems like this,
but you know it's kind of a nice title
as to say like visualising the butterfly
effect and
I'm not sure if you really believe this
looks that much like a butterfly.
An Attractor is a space, a subspace, inside a
3D space that things
end up converging onto. For- in this case
you could start the
wheel with any kind of initial motion or
you could fill up the water
anywhere you wanted, but if you let it
evolve over time under its own laws of
physics, the point
will soon get onto this consistent kind
of butterfly wing shape.