Skip to main content
100%

Full Sol LeWitt in d3 v3

✓ Published0🌍 Public
TTobi Olabode
Last edited Nov 7, 2023
Created on Nov 7, 2023

This example renders a generative geometric composition using D3 v5, creating a grid of horizontal and vertical rectangles that are masked to reveal two contrasting overlays. The code builds an SVG canvas sized to the browser window, uses `d3.range` to generate 100 rectangles in each direction, and applies `d3.symbol` paths (including a triangle) as masks to selectively show or hide the grid lines. It demonstrates the use of `d3.select` for DOM manipulation and local module imports to organize code.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.

Test Heading

MIT Licensed

Similar vizzes