Viewing a saved revision (read-only)
049706300a7c432ca40b9efca113e453
Episode 3: Sol LeWitt in Vanilla JavaScript : Mar 27,2021 : group of Squares, more squares
This example generates a colorful grid of randomly colored squares, inspired by the geometric abstraction of Sol LeWitt. It creates 100 by 100 small SVG rectangles, each with a random RGB fill, filling the entire viewport. The code uses Vanilla JavaScript to programmatically create and append SVG elements via the Document Object Model (DOM), setting each rectangle’s width, height, x, and y positions to 10 pixels. The result is a static, pixel-like mosaic that showcases generative art through simple, repetitive loops and random color selection.
AI-generated descriptionInspiration Curran's live streaming
Exercise options:
Reproduce any Sol LeWitt piece.
Create generative art in the spirit of Sol LeWitt.
Add animation to what we’ve created (e.g. rotation).