Wiki Menu


Home
Syllabus
Schedule
Screen Copy
Grader
Pre-Test
Billiards
Induction
Deduction
3 Ladies
3 Prisoners
Arithmetic
Pyramid
Geometric
Keyboard
Binary
8-Bit Adder
Squares
Cubes
Ring Game
Fibonacci
Phyllotaxis
Nim
Staircase
Counting
Flowers
Permutations
Duplications
Coin Flip
Combinations
Pascal's Tree
Texas Poker
Dice Rolls
Candychines
Lottery
Binomial ESP
More Dice
Monty Hall
Birthdays
BlackJack
Slot Machines
Ciphers
Today's Quote
Bell Curve
M&M Sampling
Worm Holes
Doodles
World Tour
CSG
Polys
Fractals
Chaos Game
Eggbrot

Chaos Game


Applet

Let's Play The Chaos Game





  • On a sheet of paper, mark the three vertices of an equilateral triangle.
  • Variations of this game use other shapes like a square.
  • Mark the vertices A, B and C, as shown below.



  • With a pencil or pen, mark any other point chosen at random on the paper.
  • We will call this point P. Mark the point, but don't label it.
  • Now roll an ordinary 6-faced die.
  • If the die comes up 1 or 2, measure half the distance from P to vertex A, and plot a new point there. (Remember where this point is, but don't label it.)
  • If the die shows 3 or 4, do the same thing, but instead go half the distance toward vertex B.
  • If the die shows 5 or 6, go halfway to vertex C.
  • Continue this process, using your newly marked points as the new starting points for each move.
  • Play for about 30,000 moves or until you get tired -- whichever comes later.

It seems intuitively clear that "chaos" would be a good word to describe this game. After all, you are marking 30,000 points, each of which is selected by applying a random process -- the roll of a die. And each game should progress differently, since there is randomness involved in each move. After 30 rolls of the die, one very tired player ploted the following points:



Of course, if you start with a point within the boundaries of the triangle, then all of the points will stay within the triangle. So it is not unexpected that all of these points are contained within the triangle. But is there any other pattern that we do not yet see? Let's continue to play the game, this time for a total of 100 rolls:



After 400 rolls of the die, a pattern begins to emerge:



And after 30,000 rolls of the die, the pattern is quite obvious:



Rather than a random spattering of dots, we find that the points plotted all fall in the Sierpinski Triangle, also called the Sierpinski Gasket, a fractal you have seen before. Here's another place to see it: The Snowflake Curve and Other Fractals.

Order in Chaos

One of the strange allures of mathematics is that it often happens that there is an eerie kind of order lurking just behind the scene in what at first appears to be chaos! In this particular case, however, it is not that difficult to believe that the chaos game should indeed give rise to the Sierpinski gasket. Let's denote the Sierpinski gasket by the letter S. If we start with a point P that just happens to be one of the points in S, then the next point (which is halfway toward one of the vertices) will also be in S. (This can be proven algebraically, but it is easy to convince yourself from the picture that this will be the case. Just try it with a few of the points shown in S above.) So in the case that we happened to start with a point in S, then the next 30,000 points plotted will also be in S.

On the other hand, if we start with a point P that is not in S, then none of the 30,000 points plotted will actually be in S! (Try this by looking at a point P that is in the large omitted triangle in the middle of the picture above. If we move halfway toward a vertex, we will be in the next-smaller-sized omitted triangle that is closer to that vertex. And that pattern of notbeing in S will continue indefinitely.) However, with each roll of the die, the point plotted is closer to some point in S. Specifically, if the initial point P is a distance d from the closest point in S, then after the next roll, our distance from some point of S will be d/2. Since the distance from S is halved with each roll, it follows that after only 10 rolls, our distance from some point in S will be , which is less than , and after 30 rolls, the distance from S is , a distance which is imperceptible on even the highest resolution display device. Thus, after a relatively small number of rolls, it appears that all of the remaining points are in S. So the Chaos Game may not always draw a picture of S, but it will at least always give a good forgery! To make the forgery even better, we simply omit the first 30 points when drawing the final picture.

Variations of the Chaos Game

The process of moving half the distance to a vertex can be accomplished by applying a transformation of the plane. In order to obtain algebraic formulas for the three transformations used in the Chaos Game, let's place the lower left vertex A at the origin of the plane. If the coordinates of the point P are , then the point that is half the distance toward A will be . Mathematically, we can express this process as a transformation of the plane: . The transformations T2 and T3 corresponding to the other two moves in the Chaos Game can be expressed by similar formulas. The Chaos Game is played mathematically by (many times) randomly selecting one of T1, T2 or T3 and applying it to the previously plotted point.

We can vary the Chaos Game mathematically by varying the transformations. This is much, much easier than inventing a geometric interpretation of each new variation! The only stipulation is that the transformations must be based on linear processes, and must reduce distances. The discovery that these two conditions will guarantee a bounded picture as a result is actually quite recent, dating back only 15 years or so. The underlying mathematics belongs to an emerging field known as fractal geometry. A few examples of the kinds of images that can result from such variations of the Chaos Game are shown below. You can click on each of the thumbnail images to get a larger version. Some of these images have been designed to resemble things found in nature.

Further Exploration






The Chaos Game Mathlet



For 5 points, turn the Sierpinski triangle upside down. You will need to experiment by changing the numbers in the textboxes. What happens, for example, if you change the E box to 0 .5 .5 ? Notice that you do not need commas to separate numbers. Spaces will do.

The number in the Points box tells the mathlet how many points you want in your fractal. What do you see with 10 points? 100 points? 1000 points? 10000 points? 100000 points? 1000000 points? Does it look like a few points missed their target?

The numbers in each of the other textboxes are called parameters. For example, these are the parameters for the Sierpinski Triangle Gasket:

A   0.5     0.5     0.5
B   0       0       0
C   0       0       0
D   0.5     0.5     0.5
E   0       0.5     0.25
F   0       0       0.5
P   .33     .33     .34

triangle-180


Note that all parameters lie between 0 and 1. Each box should tell the mathlet how to relate to an attractor point in your fractal. The Sierpinski Triangle has 3 transformations, left-right-top, and therefore needs 3 parameters in each box. The Barnsley Fern has 4 transformations, one for each level of similarity. If, for example, you wanted a fractal in a pentagon shape, like the Crystal 5 fractal, you would need 5 parameters in each textbox.

The boxes A,B,C,D,E,F are the numbers that define the parameters for each transformation in the fractal. The parameters A, B, C, D define the rotation and scaling for each transformation. The parameters E and F define how far each transformation should move. The box labelled Probs are the probabilities assigned to each transformation. That is, this mathlet allows us to load the dice so that specific probablities happen more frequently or more rarely. Of course, the sum of the probabilities must always add to 1.

Try out some of the classical fractal patterns whose parameters are in the comment box below. At first you may just assign equal probabilites to each transformation. This works well for some fractals like the Sierpinski triangle gasket and the Koch curve, but not for other fractals like the Barnsley fern. As you can see, the fern transformations differ more extremely than the Sierpinski transforms. No one really knows what the probabilities are for drawing the fern most clearly with the least number of iterations. However, a general rule of thumb is to assign a higher probability to those transformations that have the least rate of contraction; so that the bigger the scale number, the bigger the probability. Compare the probabilites with the scales in the fern parameters.

For 5 more points, turn the Barnsley Fern upside down.

For more details on fractals, visit Randall Pyke, at Simon Fraser University.


Comments:

From wHolt - 12/23/08 3:25 PM

Try some of these parameters and see what you get...

 


    Sierpinski  Triangle Gasket     
a   0.5 0.5 0.5 
b   0   0   0  
c   0   0   0  
d   0.5 0.5 0.5
e   0   0.5 0  
f   0   0   0.5
P   .33 .33 .34   

    Twin Xmas Tree      
a   0       0       0.5
b   -0.5    0.5     0  
c   0.5     -0.5    0  
d   0       0       0.5
e   0.5     0.5     0.25   
f   0       0.5     0.5
P   0.3     0.3     0.4

    Dragon     
a   0   0   0
b   0.577   0.577   0.577
c   -0.577  -0.577  -0.577
d   0       0       0
e   0.0951  0.4413  0.0952
f   0.5893  0.7893  0.9893
P   0.3     0.3     0.4

    Cantor  Maze   
a   0.336   0       0
b   0       0.333   -0.333
c   0       1       1
d   0.335   0       0
e   0.0662  0.1333  0.0666 
f   0.1333  0       0  
P   0.2     0.4     0.4

    Twig           
a   0.387   0.441   -0.468 
b   0.43    -0.091  0.02   
c   0.43    -0.009  -0.113 
d   -0.387  -0.322  0.015  
e   0.256   0.4219  0.4
f   0.522   0.5059  0.4
P   0.3     0.3     0.4

    Crystal 4          
a   0.255   0.255   0.255   0.37
b   0       0       0       -0.642
c   0       0       0       0.642  
d   0.255   0.255   0.255   0.37   
e   0.3726  0.1146  0.6306  0.6356 
f   0.6714  0.2232  0.2232  -0.0061
P   0.15    0.15    0.15    0.55   

    Crystal 5              
a   0.382   0.382   0.382   0.382   0.382
b   0       0       0       0       0
c   0       0       0       0       0
d   0.382   0.382   0.382   0.382   0.382
e   0.3072  0.6033  0.0139  0.1253  0.492
f   0.619   0.4044  0.4044  0.0595  0.0595
P   0.2     0.2     0.2     0.2     0.2

    Tree               
a   0.195   0.462   -0.058  -0.035  -0.637
b   -0.488  0.414   -0.07   0.07    0
c   0.344   -0.252  0.453   -0.469  0
d   0.443   0.361   -0.111  -0.022  0.501
e   0.4431  0.2511  0.5976  0.4884  0.8562
f   0.2452  0.5692  0.0969  0.5069  0.2513
P   0.2     0.2     0.2     0.2     0.2

    Barnsley Fern   thicker        
a   0.849   0.197   -0.15   0  
b   0.037   -0.226  0.283   0  
c   -0.037  0.226   0.26    0  
d   0.849   0.197   0.237   0.16   
e   0.075   0.4     0.575   0.5
f   0.183   0.049   -0.084  0  
P   0.02    0.15    0.13    0.7 

    Barnsley Fern  thinner         
a   0   -.139   .17     .781 
b   0   .263    -.215   .034  
c   0   .246    .222   -.032  
d   .27 .224    .176    .739
e   .5  .57     .408    .1075
f   0   -.036   .0893   .27  
P   .02  .15    .13     .7

    Plus Sign          
a   0.4 0.4 0.4 0.4
b   0   0   0   0
c   0   0   0   0
d   0.4 0.4 0.4 0.4
e   0   0   0.6 0.6
f   0   0.6 0.6 0
P   0.25    0.25    0.25    0.25

    Spiral         
a   0.845   0.346      
b   -0.308  -0.2       
c   0.307   0.2    
d   0.845   0.346      
e   0.22    0.52       
f   -0.11   0.5
P   0.82    0.18



Comment on this Page
Last Modified 12/24/08 11:07 AM

Hide Tools