Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Tree Fractal

Public visualization

Tree Fractal

10 stars13🌍 Public
CCurran Kelleher
Last edited Oct 9, 2025
Created on Jun 24, 2019
Forked from Moon Calendar 2024

An interactive tree fractal drawn on a Canvas element responds to mouse movement, which controls branch length ratio and angle difference. The rendering uses raw Canvas API calls like `beginPath`, `lineTo`, and `stroke` to recursively draw branching lines to a depth of 11. High-resolution displays are supported via `window.devicePixelRatio` scaling. The example is based on HTML5 Examples and adapts its rendering for high pixel density screens.

AI-generated description

Interactive tree fractal with Canvas.

Move the mouse to change the branching!

Draws from HTML5 Examples.

Extended to use high resolution Canvas for high pixel density displays.

Comments

Sign in to join the discussion.

MIT Licensed