Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fractal Tree (Canvas)

Public visualization

Viewing a saved revision (read-only)

6a55bc03b4f9403dba6e32b24e92a7e1

Fractal Tree (Canvas)

0 stars0🌍 Public
KKristin Baumann
Last edited Apr 25, 2024
Created on Apr 25, 2024

A fractal tree unfolds recursively on a canvas, with each branch splitting into two shorter, angled offshoots until it reaches a fixed depth. The tree remains static, but the canvas re-renders through a custom Svelte context system, where drawing functions register and invalidate frames via `requestAnimationFrame`. The example uses the Canvas 2D API for all drawing, with recursive `branch` calls handling rotation, translation, and stroke paths to create the organic, geometric structure.

AI-generated description