"Draw a line, then from its tip draw two shorter lines angled slightly left and right, then repeat the exact same thing from each of those" — that one sentence becomes a function that calls itself (recursion), verbatim. Where an L-system reaches the same shape through string rewriting, a fractal tree gets there through recursive calls that pass down coordinates and angle directly — same concept, a different implementation path.
Each split shortens the branch by some ratio (say 0.72×), and without a depth limit (say 10 levels) the recursion never stops — a "stop once you reach this depth" condition is mandatory. Deeper trees grow exponentially more complex (branch count is 2 to the power of depth), and just three numbers — angle, length ratio, depth — swing the silhouette anywhere from a pine to a shrub.
This demo adds a small time-based sway to the angle every frame, so instead of a frozen diagram it reads like a tree moving in the wind. It's a textbook example for teaching recursion visually, and in design work it's used for branch-, vein- or river-like textures in a background.
When to use
Use it for branch-, vein- or lightning-like background textures, or to visually teach recursion. Cost grows sharply past about 12 levels of depth.