Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Red-Black Binary Tree

Public visualization

Viewing a saved revision (read-only)

c5f2ff5ecd174dce8835928d1bab1783

Red-Black Binary Tree

0 stars0🌍 Public
MMo
Last edited Oct 21, 2020
Created on Oct 21, 2020

This example visualizes a red-black binary tree, demonstrating node insertion and layout in real time. It uses D3.js v4 with a force-directed simulation (`d3.forceSimulation`) to position nodes, applying forces for body repulsion, link attraction, and depth-based horizontal/vertical positioning. Users can toggle between SVG and Canvas rendering, with an optional low-resolution Canvas mode on high-DPI displays. The tree structure is built via `d3.binaryTree`, and the code instruments the `insert` method to animate each new node’s placement before re-rendering.

AI-generated description

A bare minimum HTML page.

See also React Starter.