Overview
Introduction
First described by Paul Levy in 1938, the Levy C curve is a genuine landmark of fractal geometry, an open, self-similar curve built from a deceptively simple rule that curls into a dense, C-shaped pattern as it's iterated.
Set an iteration count and the tool renders the curve as an SVG line drawing, downloadable as SVG or PNG.
What Is Generate a Levy C Curve?
A generator for the classic Levy C curve, an open self-similar fractal built with a 45 degree turtle-graphics replacement rule, one of the well-documented curves in fractal geometry alongside the Koch curve and the dragon curve.
The output is pure line art, a single connected open path with no fill, drawn as a stroked SVG polyline.
How Generate a Levy C Curve Works
Construction starts from one straight segment. At each iteration, every existing segment is replaced with the rule turn 45 degrees, forward, turn -90 degrees, forward, turn 45 degrees, applied recursively so the compounding turns fold the curve back on itself across nested levels.
Because the starting shape is a single open segment rather than a closed polygon, the curve never wraps into a boundary, it stays a single continuous open path from a fixed start point to a fixed end point no matter how many iterations are applied.
The rendered path is normalized to the SVG viewbox and drawn as a single stroked polyline, with the same coordinate data backing both the SVG and PNG downloads.
When To Use Generate a Levy C Curve
Use it when you want a recognizable, well-documented fractal curve with a distinctive curling C shape, for teaching, illustration, or generative design work.
It's also a natural point of comparison against other turtle-graphics curves in this catalog, like the Koch curves, since it uses the same underlying construction method with a different rule and angle.
Often used alongside Generate a Koch Triangle, Generate a Triflake Curve and Generate a Vicsek Fractal.
Features
Advantages
- A genuine, well-documented classical fractal, not an approximation or variant.
- Renders instantly at any supported iteration count, with no server round trip.
- Downloadable as clean vector SVG or a rasterized PNG.
Limitations
- Capped at 15 iterations to keep segment counts and download sizes reasonable.
- Stroke only, there is no fill option since the curve is open and doesn't enclose an area.
Examples
Best Practices & Notes
Best Practices
- Start at a low iteration count, around 3 to 5, to see individual bends in the rule before jumping to the denser default of 11.
- Download as SVG if you plan to recolor, scale, or place the curve into other vector artwork, use PNG for a quick raster embed.
Developer Notes
The curve comes from the shared L-system engine with axiom `F` and rule `F -> +F--F+` at a 45 degree turn angle. Segment count doubles per iteration, matched to the 0-15 iteration bound so even the deepest level stays well within a fast, in-browser render.
Generate a Levy C Curve Use Cases
- Teaching a classic, well-documented self-similar fractal curve alongside the Koch and dragon curve families
- Generating a distinctive curling line pattern for design or generative art work
- Producing a downloadable SVG asset of a landmark fractal geometry curve
Common Mistakes
- Expecting the curve to close into a boundary, it never does, it stays a single open path from start point to end point.
- Judging the curve at very low iteration counts, the characteristic C-shaped curl only becomes visually clear after several rounds of the rule.
Tips
- Compare this against Koch Triangle Generator, both are open curves built with the same turtle-graphics method, but very different rules and turn angles produce very different shapes.
- Try mid-range iteration counts, around 6 to 8, to see the curl developing gradually before reaching the denser default.