Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Random Squares and circles

Public visualization

Viewing a saved revision (read-only)

81b8e133c26d4bf2be500913bd92d82f

Fork of Random Squares and circles

1 star2🌍 Public
NNita
Last edited Jan 3, 2024
Created on Jan 3, 2024
Forked from Random Squares

This gallery item demonstrates the visual result of overlaying randomly generated SVG shapes. Using an HTML5 `<svg>` canvas, the code executes three separate JavaScript loops to populate the space with 500 `<rect>` elements, 200 `<circle>` elements, and 100 `<polygon>` elements representing triangles. Each shape receives a random RGB color from a palette generated with `Math.random()`, as well as random positioning within the 1000-by-1000 pixel viewport and a random size up to 50 pixels. The visualization showcases how combining basic geometric primitives with randomized attributes can create a colorful, abstract composition.

AI-generated description

Demonstration of SVG shapes.