Fork of Sol LeWitt Reproduction with D3
This example reproduces a Sol LeWitt art piece as an interactive SVG graphic. It generates a grid of 120 horizontal and vertical bands, each with a repeating pattern that shifts based on a mask. The code builds two alternating bands of white and black, then uses two masks, each applying a different pattern rotation. Using the D3 library, it leverages `select`, `range`, `symbol`, `symbols`, and `scaleBand` to construct the visual, with `symbol(d, size)()` generating the shape paths. The rendering is fully in SVG, defined entirely in `index.js` with `window.innerWidth` and `window.innerHeight` for dimensions and a `padding` constant.
AI-generated descriptionA reproduction of a Sol LeWitt art piece.
This time, we repeat the previous program but incorporate D3 and make the complete Sol Lewitt art using d3 symbols package.
attr accepts both constant values and functions
use class or group elements to ensure 2 svg objects do not try to operate on same data.