Rules of the game:
- A point (x,y) is selected at random and drawn. Then the following process starts:
- A four-sided die is rolled in order to choose one of the four transformations given below.
- This randomly chosen transformation is applied to the point most recently obtained and the new point is born and drawn.
This Markov process produces the Apollonian Window with a great accuracy.
The four transformations Fi: (x, y) --> (x', y') are defined here:
F1: x' = x
y' = - yF2: x' = x / (16x2 + 16y2 - 8y + 1)
y' = (4x2 + 4y2 - y) / (16x2 + 16y2 - 8y + 1)F3: x' = (x2 + y2 - x - 2y + 1) / ((x-1)2 + (y-1)2)
y' = (x2 + y2 - 2x - y + 1) / ((x-1)2 + (y-1)2)F4: x' = - (x2 + y2 + x - 2y + 1) / ((x+1)2 + (y-1)2 )
y' = (x2 + y2 + 2x - y+1) / ((x+1)2 +(y-1)2)Can you guess what they represent?
Remarks: The Markov chain of transformations that allows one to obtain Sierpinski Gasket as the orbit of a randomly chosen point is a well known example of a so-called "Chaos Game". Here is how you do it:
- Choose tree points in a plane, say A, B, and C (vertices of a triangle).
- Now, pick a random point P in the plane.
- Pick at random one of the vertices and draw a midpoint P1 between P and this vertex.
- Pick at random one of the vertices and draw a midpoint P2 between P1 and this vertex.
- Iterate this process, getting a sequence of points (Pi).
In a short while the points, except the first few, will form a recognizable, almost perfect, shape of the Sierpinski Gasket.
I do not know who is the author of this idea (let me know if you do). Writing a program that plots these points is however a standard exercise for students of Computer Science, as the writing a rather short script is rewarded by a very aesthetical graphical result.
As for the rules for the Apollonian Window that I gave above, I believe that no simpler formulas would do the job.