Fractal Fourmulas

A square can be divided into four right triangles. A right triangle can be divided into a square and two more right triangles. These simple rules, applied again and again, can be used to create fractals, or shapes that echo themselves on smaller and smaller scales.

trisquare5

trisquare3

trisquare4

trisquare2

trisquare6

trisquare7

trisquare1

Go with the Floe

Fractals are shapes that contain copies of themselves on smaller and smaller scales. There are many of them in nature: ferns, trees, frost-flowers, ice-floes, clouds and lungs, for example. Fractals are also easy to create on a computer, because you all need do is take a single rule and repeat it at smaller and smaller scales. One of the simplest fractals follows this rule:

1. Take a line of length l and find the midpoint.
2. Erect a new line of length l x lm on the midpoint at right angles.
3. Repeat with each of the four new lines (i.e., the two halves of the original line and the two sides of the line erected at right angles).

When lm = 1/3, the fractal looks like this:

stick1

(Please open image in a new window if it fails to animate)

When lm = 1/2, the fractal is less interesting:

stick2

But you can adjust rule 2 like this:

2. Erect a new line of length l x lm x lm1 on the midpoint at right angles.

When lm1 = 1, 0.99, 0.98, 0.97…, this is what happens:

stick3

The fractals resemble frost-flowers on a windowpane or ice-floes on a bay or lake. You can randomize the adjustments and angles to make the resemblance even stronger:

frostfloe

Ice floes (see Owen Kanzler)

Ice floes (see Owen Kanzler)

Frost on window (see Kenneth G. Libbrecht, )

Frost on window (see Kenneth G. Libbrecht)

Know Your Limaçons

Front cover of The Penguin Dictionary of Curious and Interesting Geometry by David WellsThe Penguin Dictionary of Curious and Interesting Geometry, David Wells (1991)

Mathematics is an ocean in which a child can paddle and an elephant can swim. Or a whale, indeed. This book, a sequel to Wells’ excellent Penguin Dictionary of Curious and Interesting Mathematics, is suitable for both paddlers and plungers. Plumbers, even, because you can dive into some very deep mathematics here.

Far too deep for me, I have to admit, but I can wade a little way into the shallows and enjoy looking further out at what I don’t understand, because the advantage of geometry over number theory is that it can appeal to the eye even when it baffles the brain. If this book is more expensive than its prequel, that’s because it needs to be. It’s a paperback, but a large one, to accommodate the illustrations.

Fortunately, plenty of them appeal to the eye without baffling the brain, like the absurdly simple yet mindstretching Koch snowflake. Take a triangle and divide each side into thirds. Erect another triangle on each middle third. Take each new line of the shape and do the same: divide into thirds, erect another triangle on the middle third. Then repeat. And repeat. For ever.

A Koch snowflake (from Wikipedia)

A Koch snowflake (from Wikipedia)

The result is a shape with a finite area enclosed by an infinite perimeter, and it is in fact a very early example of a fractal. Early in this case means it was invented in 1907, but many of the other beautiful shapes and theorems in this book stretch back much further: through Étienne Pascal and his oddly organic limaçon (which looks like a kidney) to the ancient Greeks and beyond. Some, on the other hand, are very modern, and this book was out-of-date on the day it was printed. Despite the thousands of years devoted by mathematicians to shapes and the relationship between them, new discoveries are being made all the time. Knots have probably been tied by human beings for as long as human beings have existed, but we’ve only now started to classify them properly and even find new uses for them in biology and physics.

Which is not to say knots are not included here, because they are. But even the older geometry Wells looks at would be enough to keep amateur and recreational mathematicians happy for years, proving, re-creating, and generalizing as they work their way through variations on all manner of trigonomic, topological, and tessellatory themes.


Previously pre-posted (please peruse):

Poulet’s Propeller — discussion of Wells’ Penguin Dictionary of Curious and Interesting Numbers (1986)

O Apollo

One of Swinburne’s most powerful, but least-known, poems is “The Last Oracle”, from Poems and Ballads, Second Series (1878). A song in honour of the god Apollo, it begins in lamentation:

Years have risen and fallen in darkness or in twilight,
   Ages waxed and waned that knew not thee nor thine,
While the world sought light by night and sought not thy light,
   Since the sad last pilgrim left thy dark mid shrine.
Dark the shrine and dumb the fount of song thence welling,
   Save for words more sad than tears of blood, that said:
Tell the king, on earth has fallen the glorious dwelling,
   And the watersprings that spake are quenched and dead.
Not a cell is left the God, no roof, no cover
   In his hand the prophet laurel flowers no more.

And ends in exultation:

         For thy kingdom is past not away,
            Nor thy power from the place thereof hurled;
         Out of heaven they shall cast not the day,
            They shall cast not out song from the world.
         By the song and the light they give
         We know thy works that they live;
         With the gift thou hast given us of speech
         We praise, we adore, we beseech,
         We arise at thy bidding and follow,
            We cry to thee, answer, appear,
   O father of all of us, Paian, Apollo,
            Destroyer and healer, hear! (“The Last Oracle”)

The power, grandeur and beauty of this poem remind me of the music of Beethoven. Swinburne is also, on a smaller scale and in a different medium, one of the geniuses of European art. He and Beethoven were both touched by Apollo, but Apollo was more than the god of music and poetry: he also presided mathematics. But then mathematics is much more visible, or audible, in music and poetry than it is in other arts. Rhythm, harmony, scansion, melody and rhyme are mathematical concepts. Music is built of notes, poetry of stresses and rhymes, and the rules governing them are easier to formalize than those governing, say, sculpture or prose.  Nor do poetry and music have to make sense or convey explicit meaning like other arts. That’s why I think a shape like this is closer to poetry or music than it is to painting:

Apollonian gasket (Wikipedia)

(Image from Wikipedia.)

This shape has formal structure and beauty, but it has no explicit meaning. Its name has a divine echo: the Apollonian gasket or net, named after the Greek mathematician Apollonius of Perga (c.262 BC–c.190 BC), who was named after Apollo, god of music, poetry and mathematics. The Apollonian gasket is a fractal, but the version above is not as fractal as it could be. I wondered what it would look like if, like fleas preying on fleas, circles appeared inside circles, gaskets within gaskets. I haven’t managed to program the shape properly yet, but here is my first effort at an Intra-Apollonian gasket:

Apollonian gasket

(If the image does not animate or looks distorted, please try opening it in a new window)

When the circles are solid, they remind me of ice-floes inside ice-floes:

Apollonian gasket (solid)

Simpler gaskets can be interesting too:

five-circle gasket


five+four-circle gasket


nine-circle gasket

Tri Again

All roads lead to Rome, so the old saying goes. But you may get your feet wet, so try the Sierpiński triangle instead. This fractal is named after the Polish mathematician Wacław Sierpiński (1882-1969) and quite a few roads lead there too. You can create it by deleting, jumping or bending, inter alia. Here is method #1:

Sierpinski middle delete

Divide an equilateral triangle into four, remove the central triangle, do the same to the new triangles.

Here is method #2:

Sierpinski random jump

Pick a corner at random, jump half-way towards it, mark the spot, repeat.

And here is method #3:

Sierpinski arrowhead

Bend a straight line into a hump consisting of three straight lines, then repeat with each new line.

Each method can be varied to create new fractals. Method #3, which is also known as the arrowhead fractal, depends on the orientation of the additional humps, as you can see from the animated gif above. There are eight, or 2 x 2 x 2, ways of varying these three orientations, so eight fractals can be produced if the same combination of orientations is kept at each stage, like this (some are mirror images — if an animated gif doesn’t work, please open it in a new window):

arrowhead1

arrowhead2

arrowhead3

arrowhead4

arrowhead5

If different combinations are allowed at different stages, the number of different fractals gets much bigger:

• Continuing viewing Tri Again.

V for Vertex

To create a simple fractal, take an equilateral triangle and divide it into four more equilateral triangles. Remove the middle triangle. Repeat the process with each new triangle and go on repeating it. You’ll end up with a shape like this, which is known as the Sierpiński triangle, after the Polish mathematician Wacław Sierpiński (1882-1969):

Sierpinski triangle

But you can also create the Sierpiński triangle one pixel at a time. Choose any point inside an equilateral triangle. Pick a corner of the triangle at random and move half-way towards it. Mark this spot. Then pick a corner at random again and move half-way towards the corner. And repeat. The result looks like this:

triangle

A simple program to create the fractal looks like this:

initial()
repeat
  fractal()
  altervariables()
until false

function initial()
  v = 3 [v for vertex]
  r = 500
  lm = 0.5
endfunc

function fractal()
  th = 2 * pi / v
[the following loop creates the corners of the triangle]
  for l = 1 to v
    x[l]=xcenter + sin(l*th) * r
    y[l]=ycenter + cos(l*th) * r
  next l
  fx = xcenter
  fy = ycenter
  repeat
    rv = random(v)
    fx = fx + (x[rv]-fx) * lm
    fy = fy + (y[rv]-fy) * lm
    plot(fx,fy)
  until keypressed
endfunc

function altervariables()
[change v, lm, r etc]
endfunc

In this case, more is less. When v = 4 and the shape is a square, there is no fractal and plot(fx,fy) covers the entire square.

square

When v = 5 and the shape is a pentagon, this fractal appears:

pentagon

But v = 4 produces a fractal if a simple change is made in the program. This time, a corner cannot be chosen twice in a row:

square_used1

function initial()
  v = 4
  r = 500
  lm = 0.5
  ci = 1 [i.e, number of iterations since corner previously chosen]
endfunc

function fractal()
  th = 2 * pi / v
  for l = 1 to v
    x[l]=xcenter + sin(l*th) * r
    y[l]=ycenter + cos(l*th) * r
    chosen[l]=0
  next l
  fx = xcenter
  fy = ycenter
  repeat
    repeat
      rv = random(v)
    until chosen[rv]=0
    for l = 1 to v
      if chosen[l]>0 then chosen[l] = chosen[l]-1
    next l
    chosen[rv] = ci
    fx = fx + (x[rv]-fx) * lm
    fy = fy + (y[rv]-fy) * lm
    plot(fx,fy)
  until keypressed
endfunc

One can also disallow a corner if the corner next to it has been chosen previously, adjust the size of the movement towards the chosen corner, add a central point to the polygon, and so on. Here are more fractals created with such variations:

square_used1_center

square_used1_vi1

square_used1_vi2

square_used2

pentagon_lm0.6

pentagon_used1_5_vi1

hexagon_used1_6_vi3

Yew and Me

The Pocket Guide to The Trees of Britain and Northern Europe, Alan Mitchell, illustrated by David More (1990)

Leafing through this book after I first bought it, I suddenly grabbed at it, because I thought one of the illustrations was real and that a leaf was about to slide off the page and drop to the floor. It was an easy mistake to make, because David More is a good artist. That isn’t surprising: good artists are often attracted to trees. I think it’s a mathemattraction. Trees are one of the clearest and commonest examples of natural fractals, or shapes that mirror themselves on smaller and smaller scales. In trees, trunks divide into branches into branchlets into twigs into twiglets, where the leaves, well distributed in space, wait to eat the sun.

When deciduous, or leaf-dropping, trees go hungry during the winter, this fractal structure is laid bare. And when you look at a bare tree, you’re looking at yourself, because humans are fractals too. Our torsos sprout arms sprout hands sprout fingers. Our veins become veinlets become capillaries. Ditto our lungs and nervous systems. We start big and get small, mirroring ourselves on smaller and smaller scales. Fractals make maximum and most efficient use of space and what’s found in me or thee is also found in a tree, both above and below ground. The roots of a tree are also fractals. But one big difference between trees and people is that trees are much freer to vary their general shape. Trees aren’t mirror-symmetrical like animals and that’s another thing that attracts human eyes and human artists. Each tree is unique, shaped by the chance of its seeding and setting, though each species has its characteristic silhouette. David More occasionally shows that bare winter silhouette, but usually draws the trees in full leaf, disposed to eat the sun. Trees can also be identified by their leaves alone and leaves too are fractals. The veins of a leaf divide and sub-divide, carrying the raw materials and the finished products of photosynthesis to and from the trunk and roots. Trees are giants that work on a microscopic scale, manufacturing themselves from photons and molecules of water and carbon dioxide.

We eat or sculpt what they manufacture, as Alan Mitchell describes in the text of this book:

The name “Walnut” comes from the Anglo-Saxon for “foreign nut” and was in use before the Norman Conquest, probably dating from Roman times. It may refer to the fruit rather than the tree but the Common Walnut, Juglans regia, has been grown in Britain for a very long time. The Romans associated their god Jupiter (Jove) with this tree, hence the Latin name juglans, “Jove’s acorn (glans) or nut”… The wood [of Black Walnut, Juglans nigra] is like that of Common Walnut and both are unsurpassed for use as gunstocks because, once seasoned and worked, neither moves at all and they withstand shock particularly well. They are also valued in furniture for their good colour and their ability to take a high polish. (entry for “Walnuts”, pg. 18)

That’s from the first and longer section, devoted to “Broadleaved Trees and Palms”; in the second section, “Conifers”, devoted to pines and their relatives, maths appears in a new form. Pine-cones embody the Fibonacci sequence, one of the most famous of all number sequences or series. Start with 1 and 1, then add the pair and go on adding pairs: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144… That’s the Fibonacci sequence, named after the Italian mathematician Leonardo Fibonacci (c.1170-c.1245). And if you examine the two spirals created by the scales of a pine-cone, clockwise and counter-clockwise, you’ll find that there are, say, five spirals in one direction and eight in another, or eight and thirteen. The scales of a pineapple and petals of many flowers behave in a similar way. These patterns aren’t fractals like branches and leaves, but they’re also about distributing living matter efficiently through space. Mitchell doesn’t discuss any of this mathematics, but it’s there implicitly in the illustrations and underlies his text. Even the toxicity of the yew is ultimately mathematical, because the effect of toxins is determined by their chemical shape and its interaction with the chemicals in our bodies. Micro-geometry can be noxious. Or nourishing:

The Yews are a group of conifers, much more primitive than those which bear cones. Each berry-like fruit has a single large seed, partially enclosed in a succulent red aril which grows up around it. The seed is, like the foliage, very poisonous to people and many animals, but deer and rabbits eat the leaves without harm. Yew has extremely strong and durable wood [and the] Common Yew, Taxus baccata, is nearly immortal, resistant to almost every pest and disease of importance, and immune to stress from exposure, drought and cold. It is by a long way the longest-living tree we have and many in country churchyards are certainly much older than the churches, often thousands of years old. Since the yews pre-date the churches, the sites may have been holy sites and the yews sacred trees, possibly symbols of immortality, under which the Elders met. (entry for “Yews”, pg. 92)

This isn’t a big book, but there’s a lot to look at and read. I’d like a doubtful etymology to be true: some say “book” is related to “beech”, because beech-bark or beech-leaves were used for writing on. Bark is another way of identifying a tree and another aspect of their dendro-mathematics, in its texture, colours and patterns. But trees can please the ear as well as the eye: the dendrophile A.E. Housman (1859-1936) recorded how “…overhead the aspen heaves / Its rainy-sounding silver leaves” (A Shropshire Lad, XXVI). There’s maths there too. An Aspen sounds like rain in part because its many leaves, which tremble even in the lightest breeze, are acting like many rain-drops. That trembling is reflected in the tree’s scientific name: Populus tremula, “trembling poplar”. Housman, a Latin professor as well as an English poet, could have explained how tree-nouns in Latin are masculine in form: Alnus, Pinus, Ulmus; but feminine in gender: A. glutinosa, P. contorta, U. glabra (Common Alder, Lodgepole Pine, Wych-Elm). He also sums up why trees please in these simple and ancient words of English:

Give me a land of boughs in leaf,
A land of trees that stand;
Where trees are fallen, there is grief;
I love no leafless land.

More Poems, VIII.

The Call of Cthuneus

Cuneiform, adj. and n. Having the form of a wedge, wedge-shaped. (← Latin cuneus wedge + -form) (Oxford English Dictionary)

This fractal is created by taking an equilateral triangle and finding the centre and the midpoint of each side. Using all these points, plus the three vertices, six new triangles can be created from the original. The process is then repeated with each new triangle (if the images don’t animate, please try opening them in a new window):

triangle_div2

If the centre-point of each triangle is shown, rather than the sides, this is the pattern created:

triangle_div2_dots

Triangles in which the sides are divided into thirds and quarters look like this:

triangle_div3

triangle_div3_dots

triangle_div4

triangle_div4_dots

And if sub-triangles are discarded, more obvious fractals appear, some of which look like Lovecraftian deities and owl- or hawk-gods:


cthuneus1

cthuneus2

cthuneus3


Elsewhere Other-Accessible

Circus Trix — a later and better-illustrated look at these fractals

Curiouser and Cuneuser

This fractal is created by taking an equilateral triangle, then finding the three points halfway, i.e. d = 0.5, between the centre of the triangle and the midpoint of each side. Using all these points, plus the three vertices, seven new triangles can be created from the original. The process is then repeated with each new triangle:

7triangle

When sub-triangles are discarded, more obvious fractals appear, including this tristar, again using d = 0.5:

tristar

However, a simpler fractal is actually more fertile. This cat’s-cradle is created when d = 0.5:

catscradle

But as d takes values from 0.5 to 0, a very familiar fractal begins to appear: the Sierpiński triangle:

catscradle_expanding

When the values of d become negative, from -0.1 to -1, this is what happens:

catscradle_expanding_to_cuneus

Pre-previously posted (please peruse):

Curious Cuneus