Skip to main content
100%

Random lines

✓ Published2🌍 Public
NNita
Last edited Jan 3, 2024
Created on Jan 3, 2024

This example shows a 1000 by 1000 pixel SVG canvas filled with five hundred random lines. The lines have randomly generated start and end coordinates, and each line is assigned a random hexadecimal color. The code creates the lines dynamically using the DOM API, specifically `document.createElementNS` with the SVG namespace, and appends them to the SVG element via `getElementsByTagName`. The rendering is pure SVG, with no external libraries or data sources.

AI-generated description

Demonstration of SVG shapes.

MIT Licensed

Similar vizzes