I prefer the first method. You start out with a line. Every line present in any iteration is split up into two lines of equal length a little smaller than the first one. The two new lines form a right triangle with the line they came from and the line they came from is erased. Since a line has two sides, each set of new lines could go on either side; to make the dragon curve the new lines must go on the appropriate side. For a while my program made triangles instead of dragon curves when it was dragon curves I wanted. this awesome youtube video helped me figure out what was wrong. If you want an adequate explanation of the dragon curve go to This Amazing Website . I think about it as lines but the triangle method shows how things have to be done better. The website is super awesome I highly recommend it. I have made a variety of shapes by varying the technique for where the lines are drawn.
The nature of this particular algorithm is that each line becomes its own shape later on. In the dragon curve each line becomes a dragon. In the triangle each becomes a triangle. I suspect this isn't completely true for some of the weirder shapes because a line may be created in conditions differing from those of the original shape, but subsequent lines may be in those conditions.
This nuance means if the algorithm changes after a couple iterations, the established shape will end up composed of copies of the shape the new algorithm specifies.
Triangle made of dragon curves
Dragon curve made of triangles
Dragon curve made of smaller triangles
IT DOESN'T LOOK LIKE A DRAGON!!!! NERD!!
ReplyDeleteIT DOESN'T LOOK LIKE A DRAGON!!!! NERD!!
ReplyDelete