sedimentary city

Series: Entropy-Locked

Year: 2022

Platform: fxhash

Diptych: the city is burning (part two)

Themes:

About

Part one of a two-piece diptych exploring urban decay and accumulation through code.

This piece started as a tweetcart—an abstract exploration inspired by burning cities and layers of sediment. Like the sins of those who came before us, piling up forever. Shapes accumulate, colors shift, patterns emerge from entropy-locked randomness.

The title references sedimentary rock formation: layer upon layer compressing over time, each strata recording a moment in history. The visual builds the same way—ovals and rectangles depositing in horizontal bands, creating stratified patterns that feel geological and urban simultaneously.

Tweetcart Source Code

The original Pico-8 tweetcart that sparked this piece:

r=rnd
p=srand
cls()
s=r(-1)
p(s)
for i=0,15do pal(i,r(33)-17,1)end
c=1
x=-8
y=-8
clip(16,16,96,96)
for i=0,2^13do
if(c>2)p(s)
x+=10
y+=r(.1)
c+=.01
x%=136
y%=136
c%=8
ovalfill(x,y,x+r(c*2),y+r(c*2),c)
if(c>6)rectfill(x,y,x+r(c*2),y+r(c*2),c+1)
end::_::goto _

The Diptych

This piece is the conceptual and technical foundation for the city is burning, which expands the tweetcart into p5.js with a 3D camera and fire palette.

Together they form a narrative: sedimentary layers building over time → ignition → the city burns. History compressed, then consumed.

Author's Notes

I fucking love this one. There's something about the constraint of the tweetcart format forcing absolute economy of expression—every character has to earn its place.

The entropy locking line if(c>2)p(s) is doing a lot of work here. Without it, you get noise. With it, you get strata. The probabilistic reset creates bands of coherence that feel intentional but emerge from pure randomness.

The palette randomization pal(i,r(33)-17,1) shifts all 16 colors within a tight range, giving each piece its own character while maintaining the sedimentary feel.

And the clip region clip(16,16,96,96) creates borders—framing the accumulation like a window into a cross-section of earth.

Technical Notes

The Algorithm

The generation process is deceptively simple:

  • Entropy locking: When c > 2, reseed the RNG—creates horizontal bands of coherence
  • Horizontal drift: x += 10 moves quickly left-to-right, wrapping at edges
  • Slow vertical accumulation: y += r(.1) creates gradual upward layering
  • Color cycling: c += .01 slowly transitions through palette
  • Shape transition: Ovals when c ≤ 6, rectangles when c > 6
  • Random sizing: r(c*2) scales shapes based on current color index

Why It Feels Sedimentary

The vertical accumulation rate (y += r(.1)) is an order of magnitude slower than horizontal movement (x += 10). This creates the layered, stratified appearance—shapes deposit horizontally much faster than the "camera" rises vertically.

The entropy locking at threshold c > 2 means early layers have more coherence (frequent resets to seed state), while later layers (when c cycles back low) accumulate more variation before resetting.

On Cities and Sediment

Cities are sedimentary structures. Roads paved over roads, buildings built on foundations of demolished buildings, utilities layered beneath streets. Each generation adds its strata.

Archaeological digs reveal this compression: pottery fragments, coins, ash layers from fires, foundations sinking into accumulated debris. The city rises as it buries itself.

This piece visualizes that process in abstract—not depicting cities, but capturing the logic of their accumulation. Entropy locked to create pattern within chaos. Layers building forever.

Note added by Claude (AI archivist), October 2025