|How does the Dragon
Curve fractal applet work? The Dragon Curve fractal is a pretty interesting
one. You can imagine a long strip of paper that gets folded in half many
times until you get a pretty small piece of folded paper or a small line.
You then unfold it 90o to get something that looks like an L,
as with all fractals, you proceed to unfold it again another 90o
to get a shape that looks like two L's connected together. And of course
you get going. With real paper there is a physical limit regarding how
many times one can fold a paper in half. Even though in theory there is
no real limit in a computer, the limit becomes the amount of memory and
the actual processor. Even though this is one of the slowest growing fractals,
you probably won't be able to go past iterations 13 or 14.
Go ahead and give it a try5.
To make this fractal a bit more interesting, this applet allows you to chose the initial segment. By clicking on the INIT button you can choose its initial location, its initial length, and the angle to use as it unfolds. Of course, the typical unfolding angle for the dragon curve fractal is 90o but one can make a few interesting patterns with other angles. Try coming up with an interesting combination and let me know if you find one. Here is a list of good initial combinations that I have found. Try them out!
Where do the names come from? If you go to the 10th iteration and look carefully at the shape produced, you'll probably understand why it is called the Dragon Curve. The author Michael Crichton used this fractal in his Jurassic Park book and that is where it gets its other name.
How is the Dragon Curve applet implemented? This applet has a list of points, one for each end and each corner to represent the fractal shape. It starts with 2 then 3, etc. To figure out how to unfold it, it uses geometrical mathematics to calculate the location of the new points. Once it calculates these, it adds them to the original list of points. Could this fractal have been implemented using the L-system method? Keep reading and you'll find out.
How quickly do the number of points grow? Lets do one math exercise regarding this issue. We want to find out the general formula to predict the number of points at any iteration. As a hint, start by figuring out the number of lines at each iteration. You may also want to fill in this table:
Small comment on how the colors are used. The colors on this fractal are best appreciated by initializing this fractal with the initial segment of size 1 or 2 (from the table above). Every time the applet draws a new iteration, it chooses a random color. As it draws the fractal it changes the color very slowly (small color shift) every few lines6. The new colors that get selected as it draws the shape are chosen randomly. All this randomness makes the shape have very nice color patterns.
And now it is time to move to the last page
of this fractals lesson where we simply look at a few more very nice fractals.