Lévy C-Curve Fractal

Lévy is pronounced lay-VEE.

Another well-known recursive shape is the Lévy C-curve. As in the snowflake algorithm, the base case is a single line segment.
Lévy C-Curve Level 1

At each level, the algorithm replaces a straight line with a bent line, following this rule: turn 45° left, do the previous level at a reduced size, turn 90° right, do the previous level again, and finally turn 45° left to return to the starting direction. You'll have to figure out how much smaller the size input should be in the recursive calls to make the new level exactly fit the level before.
Lévy C-Curve Level 2

  1. Talk with Your Partner The original line is replaced by two other lines; together the three would form a right triangle, with the original line being the hypotenuse. If the original line's length is held by the variable size, what length must be passed to the recursive call? That is, what are the lengths of the legs? You can use the Pythagorean formula: a^2 + b^2 = c^2.

In the third level, the sprite again replaces straight lines with bent lines, drawing 4 smaller lines. Notice that the 2nd and 3rd lines are in the same direction, so when they're the same color, as they will be in your picture, they seem to be one long line.
Lévy C-Curve Level 3

  1. What in the algorithm makes these two lines end up drawn at the same angle?
    Write Out Your ThoughtsYou may find it helpful to expand this list of commands by writing out the steps within each of the two recursive calls.
    Recall, the algorithm for each recursive level is:
    • turn 45° left
    • recursively call the previous level at the smaller size
    • turn 90° right
    • recursively call the previous level at the smaller size
    • turn 45° left

This simple algorithm builds up a complicated design at higher levels:
Lévy C-Curve Level 4

PG: Putting all the pictures here steals the fun of discovery. We need just enough to give the idea, but no more.
Lévy C-Curve Level 5

  1. Develop a program that draws a Lévy C-Curve.
  1. Changing the angles lets you create interesting variations on the Lévy C-Curve. Try some ideas of your own.
    Lévy C-Curve-like drawing