L-system Generator
Quickly visualize rules of an Lindenmayer rewrite system. Runs entirely in your browser, so your data never leaves your device.
Output
The result appears here as you type.
How to use L-system Generator
- 1. Enter the axiom and rules. Set Axiom to the starting string, like X, and write Rules one per line as symbol=replacement, such as X=X+YF+ and Y=-FX-Y for a dragon curve.
- 2. Set iterations and turtle angles. Choose Iterations for how many times the rules rewrite the string, then set Turn angle and Initial angle in degrees to control how the turtle rotates at each draw step.
- 3. Pick draw symbols and canvas size. Set Draw symbols to the characters that move the turtle forward, then adjust Width and Height in pixels along with Line color, Background color, and Line width for the rendered SVG.
- 4. Review the rendered fractal. The SVG drawing renders live as you adjust settings. Review the shape on screen, then download or copy the SVG for use in a design file or presentation.
When to use L-system Generator
L-system Generator turns a Lindenmayer rewrite system, an axiom plus symbol-replacement rules, into a rendered turtle-graphics drawing. It is for exploring fractal curves and plant-like branching structures without writing a string-rewriting and turtle-drawing engine yourself.
- Visualizing the dragon curve. You are studying the Harter-Heighway dragon curve and want to see how the shape changes as you increase Iterations from 5 to 15, watching the self-similar folding emerge step by step.
- Generating procedural plant shapes. A generative art or game project needs branching tree and fern-like shapes, and L-systems with rules like F=F[+F]F[-F]F are a standard way to produce them before porting the logic into a renderer.
- Teaching recursive rewriting systems. A computer science lesson on formal grammars and recursion uses L-systems as a visual, intuitive example, and generating a few classic curves live makes the abstract rewrite rule concrete.
- Prototyping an SVG design element. A designer wants an organic, algorithmically generated line pattern for a background or logo mark, and adjusting the axiom and angle here is faster than hand-drawing a fractal shape in vector software.
Examples
The default dragon-curve rules
Output
An SVG drawing of the Harter-Heighway dragon traced from X=X+YF+ and Y=-FX-Y.
A custom Koch-style rule F=F+F-F-F+F
Output
An SVG drawing of the zig-zag curve the rewrite rule produces.
About the L-system Generator tool
L-system Generator is a free online tool that works entirely inside your web browser. Quickly visualize rules of an Lindenmayer rewrite system. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.
This page is one of 234 Math utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.
You can shape the output with 11 settings, including Axiom, Rules (one per line, symbol=replacement), Iterations and Turn angle (degrees), and the result refreshes the moment you change one. 2 worked examples further down the page show exactly what the tool produces for real inputs.
Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every keystroke is handled on your own machine rather than by a remote API.
Frequently asked questions
Is L-system Generator free to use?
Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.
Does the generator send anything to a server?
Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.
How do I get a different result?
Run the generator again. Each run is computed fresh on your device, and any options you change are applied to the next result immediately.
Do I need to sign up or install anything?
No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.
Can I save what the tool produces?
Yes. Use the download or copy controls in the output panel to keep the rendered result once it looks the way you want.