Posts Tagged ‘dragon’

The Dragon (in Flex)

Thursday, February 28th, 2008

Ever snce I got my tattoo(s) I have been explaining the fractal known as the dragon to anyone who takes an interest in it. I’ve even named some of my villages in Travian after the turns you take to create some of them. While explaining the fractal yet again I remembered the way that I originally learned to build it: draw the next iteration over the old one. I originally found this fractal at the beginning of each chapter in Jurassic Park. Since it had a regular box shape I used to use graphing paper to draw it, then after time realized that I could turn the paper over and draw the next iteration over the old one using a simple algorithm. Start by drawing a right angle to one side of the first line, then draw a righ angle to the other side of the next line, and repeat. I have programmed this fractal many times before but I had never actually coded up this algorithm before. I also wanted it to animate so as to show the drawing steps. Without further ado:

Dragon