Skip to main content
100%

Cantor Set

✓ Published2🌍 Public
CCurran Kelleher
Last edited Oct 9, 2025
Created on Oct 26, 2019
Forked from Algae L-System

This visualization renders the Cantor set as an L-System, expanding the initial symbol "A" through eight iterations into a hierarchical string representation. Each generation appears as a horizontal band of black rectangles corresponding to the symbol "A," while "B" symbols remain empty, creating the familiar fractal’s self-similar gaps. Built with React and D3 v5, it uses `scaleBand` for positioning and sizing along both axes, with the width scale dynamically redomained per row. The SVG output is generated declaratively, mapping each valid symbol to a `<rect>` element within the React component tree.

AI-generated description

The Cantor Set computed as an L-System and rendered using React.

MIT Licensed

Similar vizzes