Skip to main content
100%

Fork of Tree Fractal

✓ Published0🌍 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.

MIT Licensed

Similar vizzes