🌍 Public
Fractal-Tree-Page
This interactive visualization displays a fractal tree that responds to mouse movement. The branching pattern changes dynamically as the user moves the cursor across the canvas. The code uses the Canvas API with high-resolution display support via `window.devicePixelRatio` and scaling. It draws recursive branches using trigonometric functions, with mouse position controlling the branch length ratio and angle difference. The tree is rendered in real-time using the `drawTree` recursive function and `stroke()` commands on the 2D context.
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.