Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Tree Fractal

Public visualization

Viewing a saved revision (read-only)

2bb0542688a942e0ad705f833e4921b9

Fork of Tree Fractal

0 stars0🌍 Public
IIvan Ivanov
Last edited Oct 18, 2022
Created on Oct 17, 2022
Forked from Tree Fractal

An interactive tree fractal renders recursive branching strokes on an HTML Canvas. Mouse position controls branch length ratio and angle difference, redrawing the tree in real time as the pointer moves. The code scales the canvas by `window.devicePixelRatio` for high pixel density displays, using the Canvas 2D API’s `beginPath`, `lineTo`, and `stroke` to draw each segment. The fork extends an HTML5 Examples project, with a blue stroke color and fixed branching depth of eleven.

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.