Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Tree Fractal

Public visualization

Fork of Tree Fractal

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed