10. THE ATTRACTION OF ATTRACTORS

Sierpinski sieve IFS, attractors,
iterative function systems, limits, mappings




1. The reluctant knight

2. Limits

3. Mappings

4. Iterative function systems (I)

5. Iterative function systems (II)

 6. The Cantor maze

7. Further investigations






























  

The reluctant knight

Imagine a knight who goes on a quest to slay a dragon. The dragon’s cave is 100 leagues from the knight’s castle. The first day the knight starts out, full of enthusiasm, and covers half the distance (50 leagues). The second day, he begins to feel afraid about meeting the dragon, and travels only half as far (another 25 leagues). This continues. Each day the knight’s fear becomes worse, and he travels only half as far as he did the day before.

1. Work out how far the knight has travelled at the end of each day. Will he ever reach the dragon?

Number of days Remaining distance (leagues) Remaining distance (metres)
 0
 1
 2
 7
14
21
28 
100
 50
 25
  0.0531
  0.00415
  0.00003
  0.0000003
482800
241400
120700
  3020
    23.6
     0.184
     0.00144

The knight will never, in fact, travel the whole distance to the dragon’s cave, but he will, given enough time, approach arbitrarily closely. Some of the figures are shown in the table.



























Limits

Limits can also apply to shapes.

3. Think of an equilateral triangle, a square, a regular pentagon. What is the next polygon in this sequence? As we add more sides, what is the 'limit'?

The figure becomes more and more like a circle. It is never a true circle, as that would require an infinite number of sides, but the limit is a circle. The figures below have 6, 12 and 24 sides.

      
The limit of a sequence of shapes often turns out to be a fractal. Many of the fractals discussed earlier (e.g. the Koch Island and the Sierpinski Sieve) occur as the limit of an infinite sequence of refinements to a shape, although the term ‘limit’ was not used.

We say that the limit of the knight’s travel, with the passing of time, is 100 leagues. The idea is that even though the knight never travels this distance, he does travel as close to it as we please.

Will the dragon mind whether, after 28 days, the knight is 1.44 mm away or 0 mm away? No, battle will have been engaged much earlier. Dragons aside, the remaining distance would eventually get so small that it would have no physical meaning at all. But to a mathematician, the separation is still there.

2. Similar practical problems arise if we try to illustrate the limit by means of a distance vs time graph drawn on the computer screen or on paper. What would happen?

In the knight’s journey, we have a sequence of numbers (the distance travelled by the knight at the end of each day), and so the limit (which does exist) is also a number.


























Mappings

Think of how a photocopier works when it is reducing. The result is a smaller copy of the original image. If we have a particularly clever copier, we might be able to arrange several reduced copies of the original picture in different positions on the same page.

Such a process can be described mathematically. Reduction of an image can be achieved by suitable scaling of the coordinates of each point in the original. The placement on the page can be achieved by then translating each point in the scaled copy. Such operations are called mappings.

Mappings can be described in terms of equations involving the coordinates of the original image. For example, suppose we want to map the illustrated unit square on to its bottom right-hand quarter.

 

The equations required are:

x' = 0.5x + 0.5
y' = 0.5y          

4. Work out the equations required to map the unit square on to each of its other three quarters.























Iterative function systems (I)

The diagram illustrates the effects of three mappings. Each maps the unit (1 1) square onto one of the three smaller squares arranged as shown.

5. Work out the equations for these three mappings. One has already been given, and you have already done one other in Question 4 above.

What happens if we repeat the same mapping on each of the three small squares, to give nine even smaller squares? What happens if we keep repeating the operation? Is there a limiting shape? See what happens after three steps, seven steps. The limiting shape looks familiar – it is our old friend the Sierpinski sieve.

A set of mappings used in this way is called an iterative function system, or IFS for short. The limiting shape or attractor is a property of the IFS and is independent of the starting shape.

Thus any (bounded) shape can be used as our starting shape: for example, triangles or circles, so long as we use the same mappings. The initial results look very different, but the limit is the same Sierpinski sieve.

View the triangle level 1, level 3, level 7, and the circle level 1, level 3 and level 7.


























Iterative function systems (II)

This program uses an IFS to generate the Sierpinski sieve from an initial triangle. Pairs of coordinates [x y] represent points. Variables p1, p2 and p3 are points of this kind; the initial triangle vertices are given in the ifs command below the line in the box. Procedures x and y use the primitives first and item to extract the individual coordinates from a point. The scale procedure scales the points from the unit square (where the calculations are done) to reasonable values for the Logo screen. The se (sentence) primitive joins two numbers to make a coordinate pair. The triangle procedure draws a triangle using three given points.

The three IFS mapping rules for the Sierpinski sieve are encoded in the rule procedure. Procedure ifs applies these mappings to the initial triangle, and as many times as the level parameter indicates.

to x :p output first :p end
to y :p output item 2 :p end
to scale :p
output se (x :p) * 160 - 80 (y :p) * 160 - 80
end
to triangle :p1 :p2 :p3
pu setpos scale :p1 pd
setpos scale :p2
setpos scale :p3
setpos scale :p1
end
to rule :n :p
if :n = 1 [output se (x :p) / 2 (y :p) / 2]
if :n = 2 [output se (x :p) / 2 + 0.5 (y :p) / 2]
if :n = 3
  
[output se (x :p) / 2 + 0.25 (y :p) / 2 + 0.5]
end
to ifs :p1 :p2 :p3 :level
if :level = 0 [triangle :p1 :p2 :p3 stop]
ifs rule 1 :p1 rule 1 :p2 rule 1 :p3 :level - 1
ifs rule 2 :p1 rule 2 :p2 rule 2 :p3 :level - 1
ifs rule 3 :p1 rule 3 :p2 rule 3 :p3 :level - 1
end
ifs [0 0] [1 0] [0.5 1] 6





















The Cantor maze

A small change to the rules of an IFS can result in a very different attractor.

6. Try running the program with the third mapping rule changed to:

x' = 1 – 0.5y
y' = 0.5x + 0.5

The attractor of this modified system is a fractal called the Cantor maze. Level 1, using a triangle as the initial shape is shown. View level 3 and level 7.

7. Describe what the altered mapping in Q6 does. The level 1 picture should give you a clue.

Further investigations

8. See what kinds of fractals you can discover by other simple changes to the Sierpinski sieve IFS (in the same style as the modification that produces the Cantor maze).

9. (Harder) Any fractal that is made up of smaller copies of itself, and nothing else, can be generated by an IFS. For each of the smaller copies, there needs to be a mapping that transforms the whole shape to that smaller copy.

Use this fact to devise an IFS that generates a Koch curve and an IFS that generates a Sierpinski carpet. An IFS with four rules will be needed for the Koch curve. Eight rules will be needed for the Sierpinski carpet.