Overview
Introduction
The terdragon, or ternary dragon curve, is one of the simplest members of the dragon-curve family: a single production rule, F to F+F-F, applied at a 120-degree turn angle produces a dense, threefold-symmetric fractal.
This tool renders it at any iteration count from 0 to 10 using its standard Lindenmayer-system definition, so you can see the curve's characteristic threefold structure and download the result as SVG or PNG line art.
What Is Generate a Terdragon Curve?
A generator for the terdragon curve, built from a Lindenmayer system with axiom F and the single production rule F to F+F-F, drawn at a 120-degree turn angle.
The only input is an iteration count (labeled "Iterations" in the tool); the axiom, rule, and angle are fixed to the curve's standard, documented definition.
How Generate a Terdragon Curve Works
The generator expands the axiom F using the single rule F to F+F-F, repeated for the chosen iteration count, at a fixed 120-degree turn angle.
The expanded string is walked by a turtle-graphics interpreter: F moves forward and draws a segment, while plus and minus turn the turtle 120 degrees left or right.
The resulting segments are rescaled to fit the SVG viewbox and rendered as a single connected path.
When To Use Generate a Terdragon Curve
Use it to see the terdragon's distinctive threefold-symmetric structure, useful for comparing how a simpler, single-rule L-system produces a fractal just as intricate as the classic dragon curve's two-rule construction.
It's a quick way to generate exportable line art of the curve without implementing the L-system expansion yourself.
If you want the classic, fourfold dragon curve instead, use the Dragon Curve Generator; for two dragons joined to tile the plane, use the Twindragon Curve Generator.
Often used alongside Generate a Dragon Curve, Generate a Twindragon Curve and L-system Generator.
Features
Advantages
- Uses the terdragon's real, documented L-system definition and 120-degree angle.
- Iteration count is validated against the curve's sane bounds (0 to 10).
- One-click SVG and PNG export of the rendered curve.
Limitations
- Fixed to the standard terdragon construction, no custom axiom, rules, or angle; use the L-system Generator for that.
- The single production rule triples the string length every iteration, so the maximum of 10 iterations is capped lower than some other tools in this category to keep the render responsive.
Examples
Best Practices & Notes
Best Practices
- Compare this tool's output against the Dragon Curve Generator at a similar iteration count to see how a single ternary rule versus a two-letter rule set produces different fractal textures.
- Step through iterations 2 through 5 first to see the folding pattern build up before jumping to the denser default.
Developer Notes
The preset uses axiom F with the single rule F to F+F-F at a fixed 120-degree turn angle, bounded to iterations 0 through 10 (`TERDRAGON_CURVE_GENERATOR_BOUNDS`), dispatched through the shared `generateFractalFromPreset("terdragon-curve", iterations)` helper that every named-curve tool in this category reuses.
Generate a Terdragon Curve Use Cases
- Generating reference line art of the terdragon curve for teaching dragon-family fractals
- Producing a downloadable SVG of the curve for a design or data-visualization project
- Comparing how a single ternary production rule versus a multi-letter rule set shapes a fractal's texture
Common Mistakes
- Assuming the terdragon uses the same axiom and rules as the plain dragon curve at a different angle, it actually uses a completely different, simpler single-rule L-system (F to F+F-F versus the dragon curve's X/Y rule pair).
- Expecting the terdragon to look like a scaled version of the classic dragon curve, its threefold symmetry gives it a visually distinct, more uniformly textured silhouette rather than the dragon curve's asymmetric zigzag.
Tips
- Try the same axiom and rule in the L-system Generator at angles other than 120 degrees to see how sensitive the terdragon's threefold symmetry is to the exact angle.
- Compare against the Twindragon Curve Generator to see two very differently constructed dragon-family fractals side by side.