Skip to main content
100%

D3 Starter

✓ Published1🌍 Public
EErika Tomakic
Last edited Dec 11, 2024
Created on Dec 10, 2024
Forked from HTML Starter

This example introduces D3.js by recreating a Sol LeWitt-inspired generative art piece. It demonstrates foundational SVG concepts and progressive coding techniques, from static shapes to dynamic, programmatic generation. The code uses D3's `select` and `range` functions to efficiently create a grid of horizontal and vertical rectangles, which are then masked by two overlapping circles. The rendering is done via SVG, and the final output is a visual pattern where the intersection of the circular masks creates a striking contrast. The example also includes a vanilla JavaScript version for comparison, highlighting the declarative power of D3's API.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes