Chaos Game - Numberphile

Video Statistics and Information

Video
Captions Word Cloud
Captions
The game is gonna involve three dots. They could be anywhere. I said I wasn't going to put them in a triangle but that's kind of difficult to avoid. Uh, it's not particularly meant to be a an equilateral triangle. Let's call this 'A', 'B', and 'C' And I'm going to put a starting point just randomly on the paper. And all we're going to do is roll this lovely dice... die? dice? (who cares?) ...to decide which point to go towards, and whatever point we choose we're gonna go half way. So let's call 'A' 1 or 2. If we get one or two, we'll go half way towards 'A'. And this is gonna be 3 or 4 and C can be 5 or 6. Uh, so, I just rolled a 2, so I need to go halfway to the point that has been chosen at random which is A in this case. So, um, we could measure this. For the sake of speed I'm just gonna go roughly half way I think you could believe that, if you run a line there, we're gonna put a dot there. And we're going to keep doing this for a while. We're iterating, so we're repeating - we get the last result and work from that. But the start point could be anywhere. I could have put the start point outside of the triangle and I could still head towards one of these dots. Let's just see what happens when I keep rolling the dice. I've just rolled a two again, so from-- that was the dot I had before, and I've gone halfway from the previous dot. And that's my halfway point. So if I roll this one again... One! Uh, I wish I'd rigged this now. From this dot (the last dot I had) halfway towards the 1, so it's gonna-- we're just aiming towards 1. This is unlikely to keep going, but, I dunno. Place your bets now. Four! Four is the B dot, so I've got to go, kinda from the previous dot, halfway on this line is about there. And I've jumped a long way this time. One, back towards A, so we're going there. And I'm gonna just keep doing this. So, you got the idea I think now. From the previous dot, we go towards one of these. Two. Your dice is rigged Brady. Six. Excellent, we've gone all the way. This was a dot-- kind of halfway over there. Six. One. Back up here... Two. Five. All the way down here. I'm going to do this a lot now, Brady. Maybe this would be worth speeding up. [music] Ah, I'm bored. [Laughs] But, it's not that exciting. The interesting thing that's happening is that it created kind of some lines, but basically I've just made a lot of dots on the paper. It's possible that something interesting would happen if I could do this quick enough that I wouldn't get so bored that I have to stop. Uh, but maybe we want a computer to do this. We have a problem with the computer though on random numbers. Like, uh, generating random numbers, uh, it's difficult when a computer has to do what it's told. But, let's, uh, park that issue for another video, perhaps. If I could get a computer to roll the dice for me and put the dot on, then we could see what happens quickly, and, let's do that. This screen has, just as we had, we've got three dots, they're not even in a nice equilateral triangle, they can be anywhere. This thing says 'trace point', it's just going to trace where that goes, and the computer is, with its magic, gonna choose A, B or C, and move that point halfway -- accurately this time. So you see that it's leaving a mark anywhere it goes. So it's gone to A several times in a row, jumped to B, and then back to A, and then to C. But, I mean, doing a running commentary on this for any longer than I have done is probably not going to make anyone's day. So let's speed it up, ah, go a little bit faster and you begin to see something similar to the structure I had. The outlines get defined quite well. But I'm just going to speed up a little bit more because the outcome of this, I genuinely think is slightly surprising, but also a little tiny bit frightening, because you start to wa-- wait... is that structure I'm seeing... am I imagining that? How is it dodging those little weird patches in the middle? Why is it never going in those? They're definitely triangles now. And then I start to see a shape which actually if you've done any sort of investigating bits of recreational maths, this is a familiar shape. It's full of triangles. It looks like that trace point, wherever it's going, which is definitely going randomly, I haven't rigged this, this is doing it differently every time we run it, but it is dodging those triangles and it's making a shape, which I think everyone can see now. This is called the Sierpenski Gasket. It turns up all over the place. This is a fractal thing you get, actually you can see now, I think we've got enough to see that the big triangle, uh, has a black triangle in the middle, and... three copies of itself around the outside of that black bit. But then each copy of itself has a black bit in the middle and three copies around itself. And that's what a fractal is, the self similar thing, you zoom in and you see a little copy of itself. But the fact this is genuinely coming from rolling a dice on a computer and doing it quickly... Makes me... sss-- I don't know, just slightly disturbed about reality. Brady: I would have thought every point... had-- had a chance of being filled at some stage, but there are lots of areas that will just never get touched. Right, and so I mean-- And you can rig it so, I-- I said you could start anywhere, right? So I could start with my point right in the middle. And then we definitely have a point right in the middle, in that black. But what happens if you iterate enough, it veers away from that. So, the long-term behavior is what's interesting, is that even if you start in a black thing... the-- the random going half way moves you away from that black area and you... Actually, the technical term for this shape is called an attractor. Um, some people, you may have heard of these things called strange attractors in chaos theory. Well it's kind of advanced maths in it, but this shape is the attraction and it's also just, it's just pretty. The fact that random behavior produces something which is very structured, it is a nice outcome. Well, we had three points. I mean, we could have four, we could have five, we could, pick a number, um, uh, probably a whole number, otherwise counting the points is difficult. We could have four points and say, well, let's roll a dice, or a four-sided dice (a d4) to go to one of those. What pattern would you get? You could say, instead of going half way, go a third of the way, or 3/4 the way, what will happen? Do any of them make patterns? Do they go chaotic? People have spent a long time fiddling with the rules. It's nice to find out for yourself, but there's one rule I'll show you which does something which nobody really expected. So I-- I'm not going to go into details. This is worth looking up. But I've got a red shape and a blue shape, and they're kind of just summarizing... two possible outcomes of the rule. Like... we'll start with a point and with some probability would go to one of the corners of the red triangle... um, but with a small probability will-- will flip over to the blue triangle. And every time you kind of roll a dice to see where to go... you-- you follow this slightly more complicated set of rules but just, they're just random. Like, you go here with a certain probability, and then you flip back to the red one with a certain probability. And... if you look up, uh, this particular rule, you get this picture after a while you start to see these green dots appearing in what looks like a very structured way in fact it becomes very obvious if you run it long enough that the picture you're getting looks like something real. It looks like a fern. That's crazy! This is called Barnes Lee's fern compare it with a real fern it's surprisingly accurate. This is a nice example of how you don't have to draw something natural by hand. All the information for this fern is captured in a few lines of probability like the rules of the game are the fern or are a picture of a fern. It's actually really useful if you want to program video game graphics. You don't want to draw every tree, every fern. So if you can just kind of store all the trees and ferns as a rule and say whene- whenever you want a fern you just do that for a while. That is a much easier way to sort of ca... And lots of natural things turn out to have this fractal structure, self similar things which means you can generate them by iterating stuff. Genuinely good graphics coming from the fractal generated graphics rather than hand-painted. To get the structure of a tree on repeat if you just add one tree and you copied it, it becomes really obvious when you're running around the forest like it's just a computer forest. But if it looks, has this natural sort of variation with some randomness in it, you get much more realistic looking trees and ferns and things. Our thanks to The Great Courses Plus for making this extra video possible. If you have a thirst for knowledge, and you probably do because you're watching Numberphile, then you really should check these guys out. From exoplanets to chess, from ancient Rome to English grammar, you're going to find something that fascinates you among this huge library of online videos. Each is taught by world-class experts from organizations like the Smithsonian, National Geographic, all the top universities. Unlimited access to the full catalog starts from as low as $14.99 a month, but you can sign on for a free trial to see just how good it is. Go to thegreatcoursesplus.com/numberphile to check them out. There's also a link in the video description. I'd recommend this one about the Tibetan Plateau and the Himalayas, bit of an interest of mine. It's got some really cool stuff about how mountains are formed and, would you believe it, it's part of a 36 part series of lectures called "The World's Greatest Geological Wonders". Have a look at that, that's seriously interesting stuff. That address, again: thegreatcoursesplus.com/numberphile or the link in the description to start you off with that free trial.
Info
Channel: Numberphile
Views: 605,653
Rating: 4.980794 out of 5
Keywords: numberphile, chaos, sierpinski
Id: kbKtFN71Lfs
Channel Id: undefined
Length: 8min 38sec (518 seconds)
Published: Thu Apr 27 2017
Reddit Comments

Math is scaring me a bit now.

👍︎︎ 87 👤︎︎ u/Lyra-V 📅︎︎ Apr 27 2017 🗫︎ replies

Is it known whether every self-similar fractal be drawn using this method?

👍︎︎ 40 👤︎︎ u/hash8172 📅︎︎ Apr 27 2017 🗫︎ replies

These are all Iterate Function Systems (IFS) they're really cool. Here's a site with some more information about them with a really cool renderer that has a library of interesting ones

http://cs.lmu.edu/~ray/notes/ifs/

 

/r/dailyprogrammer recently did a challenge to render them as well https://www.reddit.com/r/dailyprogrammer/comments/5xaoxb/20170303_challenge_304_hard_generating_a_fractal/

👍︎︎ 33 👤︎︎ u/etagawesome 📅︎︎ Apr 27 2017 🗫︎ replies

It's not exactly that counterintuitive when you think about it. Say a point ends up in the middle (empty) triangle of the Sierpinski Triangle after some nonzero number of iterations; then on its previous iteration, it was either twice that distance from a, twice the distance from b, or twice the distance from c; either way, that would put it outside the triangle on the previous iteration. So the only way for a point to be in the middle triangle is for it to be the initial point.

A similar argument applies for each of the next-smaller triangles, then the next-smaller ones, and so on. In short, as the process continues, only the points in the Sierpinski Triangle end up having a valid path to them after some sufficiently large number of iterations.

Another way to look at it is to try to do this procedure, but instead of selecting a single initial point, select all possible points in the triangle, and instead of rolling a die, move a copy of each point towards each of a, b, and c. Then, after the first iteration, you get the first iteration of the Sierpinski Triangle (via the "removing triangles" construction), after the second, you get the second iteration, and so on.

(Apologies for any lack of rigour/concrete definitions. I'm tired tonight.)

👍︎︎ 30 👤︎︎ u/edderiofer 📅︎︎ Apr 27 2017 🗫︎ replies

This one really got to me... I almost didn't believe it, so I wrote up a quick code for it. I was also a bit curious, so I made an animation of what happens if you change the step size. (meaning, what if you jump 1/3 of the way instead of half of the way)

If you're interested here it is!

I've gotta get back to work now, but I'd love to play around with a few more of them later.

Edit:

They didn't talk about this in the video, but if the step size is set to 1.5 (instead of .5 as done in the video) a new fractal emerges that looks like a snowflake!

👍︎︎ 20 👤︎︎ u/ChrisGnam 📅︎︎ Apr 27 2017 🗫︎ replies

I made a little codepen in case you wanted to play with this particular thing. It's not the most user friendly, but it works.

https://codepen.io/kevroy314/pen/ybgrZY

👍︎︎ 11 👤︎︎ u/kevroy314 📅︎︎ Apr 27 2017 🗫︎ replies

So from what I'm seeing, you can construct that fractal by jumping from midpoint to midpoint, and the act of randomness kinda jazzes the whole process up. Incredible. :D

👍︎︎ 12 👤︎︎ u/pocketMAD 📅︎︎ Apr 27 2017 🗫︎ replies

wow! this really is mind-blowing!

👍︎︎ 5 👤︎︎ u/nandocova 📅︎︎ Apr 27 2017 🗫︎ replies

That's incredible.

👍︎︎ 3 👤︎︎ u/[deleted] 📅︎︎ Apr 27 2017 🗫︎ replies
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.