Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fractal-Tree-Page

Public visualization

Viewing a saved revision (read-only)

ea6e933daf36494d82f395546b8d90bb

Fractal-Tree-Page

0 stars0🌍 Public
Sscoinhawk
Last edited Oct 16, 2021
Created on Oct 16, 2021
Forked from Tree Fractal

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 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.