fractal tree d3
✓ Published0🌍 Public
This example shows a procedurally generated fractal tree built from branching line segments, rendered as an animated SVG with a color gradient from black to purple based on depth. The code uses a recursive `branch()` function with randomness in angle and length to create organic variation, then draws each branch as a `<line>` element via D3’s data join. Hovering highlights parent branches in green, and the tree regenerates on click. It uses D3 v3 (via an external script) and D3 v7 (from `index.js`) for selection, transitions, and color scaling.
AI-generated descriptionMy fisrt viz with javascript
MIT Licensed