Skip to main content
100%

Fork of Tree Fractal

✓ Published0🌍 Public
Ppkdvalis
Last edited Nov 28, 2023
Created on Nov 28, 2023
Forked from Tree Fractal

This interactive tree fractal responds to mouse movement. The branching angle and branch length ratio change based on the cursor's horizontal and vertical position, dynamically altering the tree's shape in real time. The visualization uses the Canvas API with `drawTree` recursion, `beginPath`, `moveTo`, `lineTo`, and `stroke` to render branches, incorporating high-resolution display scaling via `window.devicePixelRatio`. The code originates from HTML5 Examples and is adapted for high pixel density screens.

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