Skip to main content
100%

Episode 3: Sol LeWitt in Vanilla JavaScript : Mar 27,2021 : group of Squares, more squares

✓ Published3🌍 Public
NNita
Last edited Mar 27, 2021
Created on Mar 27, 2021

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 description

Inspiration 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).

MIT Licensed

Similar vizzes