Squares and Triangles

Maksim Hapeyenka · 2021 · Factory

A radial burst of fine, threadlike lines forms a ragged ring around a hollow black core, set on a black ground. The filaments fan outward in dusty olive-yellow and muted violet-grey, densest near the center and dissolving into a faint haze at the edges. Delicate, smoky, like a dim eclipse or pollen halo.
Sample output of Squares and Triangles
Sample output of Squares and Triangles
Sample output of Squares and Triangles

A symphony of nothing but squares and triangles to create something beautiful. This is a project I made when I was just getting started with generative art. I decided to revive it despite all its flaws to preserve this piece of my humble history.

How it works

The core is geometric tiling. It stacks only squares and triangles as concentric, centre-sharing nests, one after another, building up layers while rotating little by little. From the repetition of just two simple shapes, it produces a complex chain of geometry on the screen. Each layer is overlaid with additive blending and coloured with hash-derived RGB, so colour accumulates like piling light the more the shapes overlap. The hash decides the rotation step, the shapes' sizes and the rarity (whether filled or rotated), generating a symphony of only squares and triangles in a different composition at every point.

Palette

Extracted from outputs · 8
#0d150d#444a29#3f454f#7f5c89#b6a1d7#6b4d64#686dcb#a781a1

Algorithms

Details

Tools
p5.js
Runtimes
Browser (Canvas / 2D), On-chain Deterministic
Movement
Long-form Generative Art
Medium
On-chain generative edition
Relations
released-on (2021-12) → art-blocks
Script hash
7f3b8c9fa1104df9bb1a2569f2a33b4e97647075209ea45b9aea111841b2b9aa
On-chain
ethereum · 0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270 · #218

View generator ↗ · Art Blocks ↗

Sources

Related works (by shared algorithms)

Quine
larva-labs · 2025
Escherly Seeds
martijn-cohen · 2023
marfaMESH
harvey-rayner · 2023
Agglo
leander-herzog · 2022
Exhibition: 3291
cryptobauhaus · 2022
Fontana
harvey-rayner · 2022
Implications
ixnayokay · 2022
Imposter Syndrome
ippsketch · 2022

Last updated 2026-07-16