Skip to main content
Public

Share visualization

Loading preview…

Fractal-Tree-Page

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fractal-Tree-Page

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

Comments

Sign in to join the discussion.

MIT Licensed