Generative Typography / ASCII

No single origin work. Rendering images as grids of characters descends from early typewriter/teletype "type art" and 1960s–70s computer text-mode graphics, and persists as a diffuse coding-community practice (e.g. ertdfgcvb's browser playground). A technique with dispersed roots rather than a datable first.

community / folk Name — A descriptive category label, not a coined or eponymous name; no single coiner of the term is attested.

In one line Rendering an image as a grid of text characters, choosing each glyph by how well its ink density (or shape) matches the local tone — the basis of text-mode and ASCII-art visuals.

Generative Typography / ASCII · Open in new tab ↗ · Motion begins only when you press Run.

The code

The actual sketch behind the demo above — sandboxed and reproducible. This is the whole thing.

ascii-art/index.html
const SEED = Math.floor(Math.random()*1e9);

// Render a procedural light field (overlapping radial gradients) then map
// brightness to an ASCII glyph ramp — generative ASCII art.
const RAMP = " .:-=+*#%@";

function setup() {
  randomSeed(SEED); noiseSeed(SEED);
  const s = Math.min(windowWidth, windowHeight);
  createCanvas(s, s);
  background(10, 13, 16);
  textFont('monospace');
  textAlign(CENTER, CENTER);

  const COLS = 70;
  const cw = s / COLS;
  const rows = Math.floor(s / cw);
  textSize(cw * 1.15);

  // light sources
  const lights = [];
  const n = 3 + Math.floor(random(3));
  for (let i = 0; i < n; i++) lights.push({ x: random(s), y: random(s), r: random(s*0.2, s*0.45) });
  const hueBase = random(360);
  colorMode(HSB, 360, 100, 100);

  for (let j = 0; j < rows; j++) {
    for (let i = 0; i < COLS; i++) {
      const x = i*cw + cw/2, y = j*cw + cw/2;
      let b = 0;
      for (const L of lights) {
        const d = Math.hypot(x-L.x, y-L.y);
        b += Math.max(0, 1 - d / L.r);
      }
      b = Math.min(1, b) * (0.7 + 0.3*noise(i*0.2, j*0.2));
      const ch = RAMP[Math.min(RAMP.length-1, Math.floor(b * RAMP.length))];
      if (ch === ' ') continue;
      fill((hueBase + b*80) % 360, 55, 40 + b*60);
      text(ch, x, y);
    }
  }
}

Open the demo source ↗

How it works

Lay a grid of character cells over the image (its resolution = the art's "pixels"). For each cell: 1. Average the source brightness within the cell. 2. Map that brightness to a glyph from a ramp ordered by ink coverage — e.g. " .:-=+*#%@" from light to dark — so darker cells get denser characters. 3. (Optional) instead of brightness, match the cell's gradient/edges to line-like glyphs (/ \ | _) for an edge-following look, and add colour by tinting each character. Because the same per-cell rule runs every frame, feeding it a live source or a time-varying function (as in ertdfgcvb's playground) animates the text image.

Parameters

Lineage

Related
Dithering, Plotter-style Hatching

Frequently combined with

Works using this algorithm (4)

ART 1
katherine-nash
⧉ Cube³s
paul-prudence
Play — ASCII Playground
andreas-gysin
Gen 2
dca

Last updated 2026-07-16