1 Horror Vacui 2 A Very Patient Turtle Who Draws Lines 3 A Taxonomy of Fractology 4 Gallery of Specimens 
Root 2 Family  Root 3 Family  Root 4 Square Grid Family  Root 4 Triangle Grid Family 
Root 5 Family  No Root 6!  Root 7 Family  Root 8 Family 
Root 9 Square Grid Family  Root 9 Triangle Grid Family  Root 10 Family  Root 12 Family 
Root 13 Square Grid Family  Root 13 Triangle Grid Family  Root 16 Square Grid Family  Root 16 Triangle Grid Family 
Root 17 and Beyond...  5 My Brain Fillith Over  6 References  7 Acknowledgements 
The turtle can perform a set of commands as one action  as a procedure, such as "DrawSquare". 
Now, the turtle will demonstrate a shape that is the basis of a wellknown fractal curve: the Koch curve. First, the turtle will rotate 90 degrees, so that it is aiming rightward. Then it will perform the procedure "DrawKoch": 
This procedure, DrawKoch, can be modified so that it is scaled to onethird its original size, and the steps that draw lines (steps 1, 3, 5, and 7 above) are replaced with copies of the whole procedure, as shown on the next page. 
This means that instead of the figure consisting of four line segments, it consists of four smaller copies of itself. Now, if you think about this for a moment, you will realize that there is a paradox: each of these copies will then have to consist of copies of themselves as well! And so on, and on. What we have is an infinite regression of copies of copies of copies... Presto! We have a fractal. The problem is that it takes an infinite amount of time to draw an infinite number of lines, so we choose a cutoff point where recursion stops. (The picture below stops at 5 levels.) 
By the way, this curve is usually referred to as the "Koch Snowflake Curve", from the original description in 1904 by the Swedish mathematician Helge von Koch [12][13]. He showed the curve as a progression of applying triangular bumps upon bumps onto the perimeter of a triangle. It looks a bit like a snowflake. 

The Koch snowflake is the equivalent of three Koch curves connected together as if they were the sides of an equilateral triangle. Mandelbrot referred to this triangle as the "initiator", and the curve that is placed onto the three sides as the "generator". In this book, I am mostly concerned with generators: that is, what happens inbetween the two endpoints of a single fractal curve.
I will not get into the nuts and bolts of programming fractal curves here. But I do have to explain some aspects of the fractal algorithm: When I make a fractal image, I can control the number of levels of which the copies are made. In other words, I can draw the Koch curve at level 1, in which case it just consists of four line segments, or I can draw it at level 2, in which case those lines consist of smaller copies of the Koch curve (scaled to onethird of the length of the segments of level 1), making the whole curve a figure of 16 line segments. Level 3 would consist of 64 line segments, and level 4 would consist of 256 line segments, and so on. To be consistent with Mandelbrot's terminology, let's call this fractal curve a "teragon" (as in the "5th teragon" or "12th teragon, and so on). Also, throughout this book I will be using the term "fractalization" to denote the process of increasing the fractal level from one teragon to the next  the process of replacing each segment with a small copy of the generator. 
Let's assume that the algorithm that draws a fractal curve automatically scales the smallest copies so that the distance from endpoint to endpoint is always the same, no matter how many levels are used, and that the lengths of the line segments always scale appropriately, just like the example shown on this page at right. 
The Turtle Flips Out
Now, there is an important aspect of the fractals that our little turtle will be drawing; and that is the fact that the line segments in a fractal generator can be "flipped" in various ways, to make the copies do clever tricks (which are important for enabling the many varieties of planefilling curves that will be shown later). But before I show you these tricks, I need to create a new view of the turtle, to make it easer to explain. This view comes in four flavors, as shown below: 

Now that we have these different views of the turtle, consider an image of the turtle drawing the Koch curve like this: 

The implication of this flipped segment is that the copy of the Koch curve that is drawn on that segment is upsidedown: 

Now let's fractalize this to teragon 4. Well, this is no longer the Koch curve we know and love! It has changed quite a bit, due to this single flipped segment in the generator. This flipping gets propagated to all the subcopies, and it makes its effect all they way to the small details of the fractal (although not in the smallest level). 

How can this flip trick be used to make a planefilling fractal curve? Glad you asked. I will show you. But first, consider the following fractal generator with no flippings, and its first 6 teragons: 

That is an interesting fractal indeed. But it crosses itself all over the place  starting at teragon 3 and increasingly for each level. It turns out that the turtle can do some clever flipping on alternating segments (the two diagonal ones), to transform this into a planefilling, selfavoiding, fractal curve. Here it is with the first 6 teragons: 

With these two flippings, this curve can be fractalized forever and it will never cross itself.
A flipping along the vertical axis is a bit more tricky to explain, because it implies that the turtle has jumped to the end of the line and drawn it backwards. This concept might be easier to grasp for those of you who have used the LOGO turtle, because the turtle can be told to move to a position (without drawing a line). 
To illustrate this in a playful way, imagine the turtle drawing a 3segment fractal generator in 6 steps, illustrated at right. In order to draw the third segment, the turtle flies to the end (step 3), draws the line backwards and upsidedown (step 4), and then flies back to the endpoint again (step 5), ending at the correct finishing location (step 6). What is the fractalized result? It is a cool selfavoiding curve, called the "Dragon of Eve". Notice the strategicallyoriented bump at the bottomright of the second teragon  this is critical to making The Dragon of Eve a selfavoiding curve.



Now let's look at a planefilling fractal curve that takes advantage of another kind of flipping. (In this example, I have shrunk the turtle in the top three segments, to indicate that they are half as long as the two segments at the bottom.) You may find it difficult to see exactly how these flippings allow the curve to fractalize the way it does. So to make it a little bit easier, I added some visuals to the first two teragons. 


Pictures of flippedout turtles are cute, but I will not be using them in the diagrams throughout this book. Instead I will be using halfarrows because they are more compact. So, the generator we just saw would be drawn like this...
In addition to representing these flippings visually with a halfarrows, they are also specified using a genetic code, as shown in the table below. At the bottom is a representation using a pointing finger. I will use this in a few examples. 


You may still be having difficulty imagining how a turtle drawing lines can create such shapes. You might prefer to understand the process in terms of transformations; copying shapes and then translating, scaling and rotating these copies in various ways to create new fractal levels. If so, you are in luck: in the next chapter I will show you some fractal generating techniques that are based on this idea. These techniques will help fleshout in more general terms how fractals are generated, and it will put my particular scheme into a larger perspective. This will give some context for the more than 200 specimens archived in this book. 
End of chapter 2. Choose chapter 3 below. 
1 Horror Vacui 2 A Very Patient Turtle Who Draws Lines 3 A Taxonomy of Fractology 4 Gallery of Specimens 
Root 2 Family  Root 3 Family  Root 4 Square Grid Family  Root 4 Triangle Grid Family 
Root 5 Family  No Root 6!  Root 7 Family  Root 8 Family 
Root 9 Square Grid Family  Root 9 Triangle Grid Family  Root 10 Family  Root 12 Family 
Root 13 Square Grid Family  Root 13 Triangle Grid Family  Root 16 Square Grid Family  Root 16 Triangle Grid Family 
Root 17 and Beyond...  5 My Brain Fillith Over  6 References  7 Acknowledgements 
Brainfilling Curves  A Fractal Bestiary
by Jeffrey Ventrella Distributed by Lulu.com Cover Design by Jeffrey Ventrella 
Book web site:
BrainFillingCurves.com
ISBN 9780983054627 Copyright © 2012 by Jeffrey Ventrella 
eyebrainbooks.com 
FractalCurves.com 