Fractals
Lévy C Curve
Recursive geometric line paths with automatic fitting.
The input levy_c(12) sets the iteration depth to 12. The Lévy C curve is two smaller copies of itself at 45 degrees. levy_c(12) has a curly C silhouette with a fractal boundary.
Each extra iteration replaces every current segment with a smaller copy. The bounding box is fitted automatically, so a deeper curve is not clipped just because it has more bends. Very large depths get slower without changing the rule.
Equation
levy_c(12)
What repeats
These fractals are produced by a rule that repeats. The line fractals replace each segment with a smaller copy according to a named curve and an iteration count. The Mandelbrot and Julia sets repeat the quadratic map z → z² + c and color a point by how quickly it escapes.
More iterations add detail, and they also add work. Escape pictures are finite-resolution approximations: a point that has not escaped yet is not a proof that it never will. Zooming the Mandelbrot or Julia view is done in the browser after the example has opened.
Reading the input
levy_c(12)— This is a command. The name selects the routine, and the items inside the parentheses are its arguments.
Try a change
- Lower the iteration count by 2 and generate. You should recognize the same rule with fewer replacements.
- Raise the count by 1 only. Each added iteration multiplies the number of segments, so large jumps get slow.
Generate Graph posts the expression to the studio graph engine and draws the result on the homepage. The editable field is the entire input, including every line.