Skip to main content
100%

Next Different Shapes Using D3

✓ Published1🌍 Public
Ssharmamilan632.m@gmail.com
Last edited Jun 17, 2024
Created on Jun 17, 2024

This example uses D3 to draw overlaid horizontal and vertical stripes that form a dynamic visual composition. The code generates 100 rectangles in each direction, spacing them 20 pixels apart, and applies two different SVG masks to create intersecting shapes. A diamond symbol, created using `d3.symbol` and `d3.symbols[1]`, is rendered at the center of each mask with contrasting fills, producing a layered effect where the stripes appear to cut through the diamond form. The visualization responds to the browser window size through `window.innerWidth` and `window.innerHeight`.

AI-generated description

A demonstration of SVG shapes.

MIT Licensed

Similar vizzes