🌍 Public
Fork of 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 descriptionInteractive 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
Comments
Sign in to join the discussion.