Dragon Curve

DOWNLOAD Mathematica Notebook

A dragon curve is a recursive nonintersecting curve whose name derives from its resemblance to a certain mythical creature.

Dragon curve animation

The curve can be constructed by representing a left turn by 1 and a right turn by 0. The first-order curve is then denoted 1. For higher order curves, append a 1 to the end, then append the string of preceding digits with its middle digit complemented. For example, the second-order curve is generated as follows: (1)1->(1)1(0)->110, and the third as (110)1->(110)1(100)->1101100.

Dragon curve recurrence plot

Continuing gives 110110011100100... (OEIS A014577), which is sometimes known as the regular paperfolding sequence and written with -1s instead of 0s (Allouche and Shallit 2003, p. 155). A recurrence plot of the limiting value of this sequence is illustrated above.

Representing the sequence of binary digits 1, 110, 1101100, 110110011100100, ... in octal gives 1, 6, 154, 66344, ...(OEIS A003460; Gardner 1978, p. 216).

DragonCurve

This procedure is equivalent to drawing a right angle and subsequently replacing each right angle with another smaller right angle (Gardner 1978). In fact, the dragon curve can be written as a Lindenmayer system with initial string "FX", string rewriting rules "X" -> "X+YF+", "Y" -> "-FX-Y", and angle 90 degrees. The dragon curves of orders 1 to 9 are illustrated above, with corners rounded to emphasize the path taken by the curve.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.