Fractal Tree Screensaver
The Fractal Tree screensaver is a free, in-browser animation that grows a recursive branching tree, leafs it in your chosen season and sways it gently in a simulated breeze. A fractal tree is built by splitting each branch into two smaller branches over and over, so the same pattern repeats at every scale. It runs instantly with no download. Press ESC to exit.
How the Fractal Tree screensaver works
The tree is drawn by a single recursive function. It starts with the trunk at the bottom-center of the screen pointing straight up, then calls itself twice for the two child branches. Each call shortens the branch to 76% of its parent and rotates it left and right by the Branch angle you set (10° to 45°), so one function expresses the whole tree.
Recursion stops at the Branch depth limit, which ranges from 6 to 13. Higher depth means more levels of splitting and a denser, more detailed crown — depth 13 produces thousands of tip branches. Line width tapers with depth so the trunk is thick and the twigs are fine, and each segment is drawn with rounded caps for a smoother join.
When a branch reaches the final depth it becomes a leaf tip. If Leaves is on, the saver draws a small colored dot there using the palette for the chosen Season — Autumn uses oranges and golds, Spring uses fresh greens, Winter uses pale frosted tones, and Bare draws no leaves at all.
Motion comes from two layers. A grow value eases the whole tree up from 40% to full height when it first appears, and a sway term — a sine wave scaled by your Wind sway setting — nudges every branch angle. Because sway is multiplied by how high a branch sits, the trunk barely moves while the outer twigs swing the most, like a real tree in wind.
A worked example
With the defaults — Branch depth: 10, Branch angle: 25°, Wind sway: 4, Leaves: on and Season: Autumn — the recursive function splits the trunk into 10 levels of branches, each child 76% the length of its parent and angled 25° to either side. The tree eases up to full height, then sways on a slow sine wave that swings the outermost twigs most. Every tip at depth 10 gets an autumn-colored leaf dot in orange or gold.
Settings & tips
- Raise Branch depth toward 13 for a lush, intricate canopy, or lower it to 6 for a sparse, minimalist sapling that renders faster.
- Switch Season to Spring, Winter or Bare to change the leaf colors, and turn Leaves off entirely for a stark winter silhouette.
- Increase Wind sway for a breezier, more animated tree, or set it to 0 for a perfectly still specimen.
Frequently asked questions
- Is the Fractal Tree screensaver free?
- Yes. It is free and runs entirely in your browser with no download or sign-up. Open the page and the tree grows on its own.
- What is a fractal tree?
- A fractal tree is a shape made by repeatedly splitting each branch into smaller branches at a fixed angle. The same branching pattern repeats at every scale, which is what makes it a fractal.
- How do I exit the Fractal Tree screensaver?
- Press the ESC key to exit at any time. Moving the mouse or pressing any key also returns you to the controls.
- Can I change the season or leaf colors?
- Yes. The Season control offers Autumn, Spring, Winter and Bare, each with its own leaf palette, and you can turn the Leaves toggle off for a bare-branch look.
- Why does the tree sway?
- A gentle sine wave nudges every branch angle to mimic wind. The effect is strongest at the outer twigs and weakest at the trunk, just like a real tree, and the Wind sway control sets its strength.