Skip to main content
100%

Fork of Tree Fractal

✓ Published0🌍 Public
KKirsten Lund
Last edited Mar 9, 2021
Created on Mar 9, 2021
Forked from Tree Fractal

An interactive tree fractal rendered on Canvas, where the branching pattern changes in response to mouse movement. The visualization draws a recursive, branching structure from a central trunk, with horizontal mouse position controlling branch length ratio and vertical position controlling the angle between branches. It uses the Canvas 2D API with recursive `drawTree` calls, and accommodates high pixel density displays by scaling the canvas using `devicePixelRatio` and CSS dimensions. The code adapts an example from HTML5Examples.

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