🌍 Public
Viewing a saved revision (read-only)
ccfe3f684b294ba483a50011c585d0f7
Next Different Shapes Using D3
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 descriptionA demonstration of SVG shapes.