Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Tree Fractal Example

Public visualization

Viewing a saved revision (read-only)

c08ebd48baa2432383d6cd08f0b89c08

Tree Fractal Example

0 stars0🌍 Public
MMilan Košir
Last edited Dec 12, 2023
Created on Dec 12, 2023
Forked from Tree Fractal

An interactive tree fractal rendered on a Canvas element responds to mouse movement by altering branch length ratio and angle difference. The code uses the Canvas 2D API with `beginPath`, `lineTo`, and `stroke` to draw recursive branches up to a depth of 11. It accommodates high pixel density displays via `window.devicePixelRatio` and `c.scale`. Mouse position maps directly to the branching parameters, updating the tree in real time.

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.