Skip to main content
Public

Share visualization

Loading preview…

Fork of Sol LeWitt Reproduction with D3

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fork of Sol LeWitt Reproduction with D3

0
JJaga-droid
Last edited Feb 5, 2023
Created on Feb 5, 2023

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 description
  1. A reproduction of a Sol LeWitt art piece.

  2. This time, we repeat the previous program but incorporate D3 and make the complete Sol Lewitt art using d3 symbols package.

  3. attr accepts both constant values and functions

  4. use class or group elements to ensure 2 svg objects do not try to operate on same data.

Comments

Sign in to join the discussion.

MIT Licensed