lternative method to compute d is to partition the curve in Figure 3 into three similar pieces as shown in Figure 5. Then the equation for d is
which can be reduced to the same algebraic equation as (8) to yield the same solution for the fractal dimension d.
Since the boundary of dragon curve is composed of four copies of the curve we just examined, the fractal dimension of the entire boundary is also d = 1.523627085.
Algorithms to Generate the Boundary of the Dragon Curve
In accordance with the two different methods for determining the dimension of the boundary of the dragon curve, we present two different algorithms for generating the four sections making up the boundary. Like the first method for calculating d, Algorithm 1 uses the idea of separating the boundary into an infinite number of copies while Algorithm 2 corresponds with the second method by viewing the boundary as three similar pieces. From Figure 6 and Figure 7, we see that Algorithm 1 is quicker to converge and aesthetically more pleasing than Algorithm 2.
Algorithm 1 :
To produce the entire boundary of the dragon curve, four similar pieces of the border, generated by the above algorithms, have to be arranged as shown in Figure 8. With a suitable scaling of n and the orientation of the curve, the pieces should fit together the boundary dragon curve
The boundary of the dragon curve can also be generated using the chaos game. For the generation of the boundary of the dragon curve using the chaos game, we utilize the IFS structure that we had analyzed earlier in Figure 5. According to the theory of the chaos game , the boundary as shown in Figure 5 can be generated by a random iterated system which corresponds the these three linear affine transformations.
T1(x,y) = ((x-y)/4-1/2, (x+y)/4+1)
T2(x,y) = ((y-x)/4+1/2, -(x+y)/4+1)
T3(x,y) = ((x+y)/2+1, (y-x)/2)
Because the complete boundary is pieced together from four similar fractals, the computer is required to "play" four similar chaos games at the same time to generate the entire border. Figure 9 shows the progress of the boundary of the dragon curve as generated by the chaos game.
The area within the boundary
We now turn our attention to the area enclosed by the boundary of the dragon curve. To determine the area, let us consider the generation of the dragon curve by iteration as shown in Figure 10.
The area at any level i can approximated by adding up the number of squares that are enclosed by the segments. Because each square is formed by four segments and each segment is shared by two squares, the number of squares is equal to the number of segments multiplied by 2/4 and the total area can be represented by the following equation:
where di is the length of the segment and ni, is the number of segments at level i.
Letting the initial length of the segment at level 0 be equal to a, di and ni can be expressed
From equations (11) and (12) we can compute the area of the dragon curve, represented by S, the limit of Si as i approaches infinity.
Therefore, the area of the dragon curve is a2/2.
An alternate method to compute the area enclosed within the boundary of the dragon curve involves the second IFS boundary structure discussed. Letting b be the length shown in Figure 11 and Si be the area enclosed by the border at any level i, we can calculate the area of the dragon curve by observing the changes in area from one level to the next. Notice that the starting area, S0, is equal to 4b2.
From Figure 11 it can be seen that as the level of generation increases, the boundary of the dragon curve folds in and out, increasing the area at one point and decreasing at another. Upon closer observation we notice from one level to the next, all these areas cancel with the exception of the areas of P1i and P2i. Because P1i increases the area of the dragon curve and P2i decreases it, the total area increases by P1i-P2i from level i to level i+1. Since P1i=b2/2i and P2i=b2/2i+1 the relation between Si+1 and Si is as follows:
From this equation we realize that from level i to level i+1, the area enclosed by the curve increases