generative_pioneers_2 · sol_lewitt_wall_drawings
Wall Drawings (LeWitt)
Sol LeWitt's wall drawings (1968-2007) are the canonical example of conceptual-art-as-algorithm: the work is the set of written instructions, and any number of draftspeople can execute them with different results that all satisfy the same rule. LeWitt published 1200+ numbered instructions in his lifetime; the most reproduced are #51 ('all architectural points connected by straight lines'), #86 ('10,000 lines about 10 inches long'), #118 ('50 points at random, connected with straight lines'), #273 (a 7-wall set with red / blue / yellow lines from midpoints / corners / center) and #289 (a 4-wall set with white lines from center / midpoints / corners). This reference implements a small library of LeWitt instructions: a regular grid of 'architectural points', a set of geometric sources (center, four corners, four midpoints), a coloured ink per rule, and a procedural renderer that connects each source to randomly chosen points on the grid. The default (sub_wall=7) renders the 7th of LeWitt's 273 walls — the rule 'all three sources, all three colors' — which is the canonical SFMOMA installation shot.
Original: https://www.sfmoma.org/read/drawing-with-instructions/
▶ Try the live demo (JS port) ▶ Run reference.py via Pyodide 10 formulas have instant JS ports. The Pyodide path runs the actual Python in your browser — first load is ~6 MB, then instant.
Math essence
For each source point s ∈ sources, for k = 1..lines_per_source, draw a straight line from s to a uniformly chosen point p on the regular grid G = { (margin + i·step, margin + j·step) : 0 ≤ i < n_x, 0 ≤ j < n_y }. The total number of lines is |sources| × lines_per_source. Multiple rules (sub_walls 1-7) layer different sources and colors on the same canvas, and the 7th wall is the union of all three sources in all three colors.
Parameters
| Name | Type | Default | Range | Description |
|---|---|---|---|---|
dim | int | 512 | 200–1200 | Square canvas side length |
drawing | int | 273 | 0–1000 | Wall drawing number (51, 86, 118, 273, 289 supported) |
sub_wall | int | 7 | 1–7 | Sub-wall (1-7) for the seven-wall instructions |
grid_step | int | 24 | 8–96 | Step of the architectural grid (px) |
lines_per_source | int | 24 | 4–200 | Lines drawn from each source point |
bg_color | tuple | 10,10,14 | null–null | Wall background RGB |
thickness | float | 1 | 0.5–3 | Ink thickness |
margin | float | 0.04 | 0–0.3 | Outer margin (fraction of dim) |
seed | int | null | 0–999999 | RNG seed |
Reference
First 60 lines of reference.py. Full source:
library_external/generative_pioneers_2/sol_lewitt_wall_drawings/reference.py
from __future__ import annotations
from typing import ClassVar
import imageio.v2 as imageio
import numpy as np
class SolLeWittWallDrawings:
family: ClassVar[str] = "generative_pioneers_2"
sketch: ClassVar[str] = "sol_lewitt_wall_drawings"
INSTRUCTIONS = {
51: {
"title": "Wall Drawing #51",
"year": 1969,
"instruction": "All architectural points connected by straight lines.",
},
86: {
"title": "Wall Drawing #86",
"year": 1971,
"instruction": "Ten thousand lines about 10 inches long, covering the wall evenly.",
},
118: {
"title": "Wall Drawing #118",
"year": 1971,
"instruction": "On a wall surface, any continuous stretch of wall, using a hard pencil, place fifty points at random. The points should be evenly distributed over the area of the wall. Connect the points with straight lines.",
},
273: {
"title": "Wall Drawing #273",
"year": 1975,
"instruction": "A 6-inch (15 cm) grid covering the wall. Lines from corners, sides, and center of the walls to random points on the grid. 1st wall: red from midpoints; 2nd: blue from corners; 3rd: yellow from center; 4th: red+blue; 5th: red+yellow; 6th: blue+yellow; 7th: all three.",
},
289: {
"title": "Wall Drawing #289",
"year": 1976,
"instruction": "Six-inch grid covering each of the four black walls. White lines to points on the grid. 1st wall: 24 lines from the center; 2nd: 12 lines from each side midpoint; 3rd: 12 lines from each corner; 4th: all combined.",
},
}
def __init__(
self,
dim: int = 512,
drawing: int = 273,
sub_wall: int = 7,
grid_step: int = 24,
lines_per_source: int = 24,
bg_color: tuple[int, int, int] = (10, 10, 14),
ink_red: tuple[int, int, int] = (220, 50, 50),
ink_blue: tuple[int, int, int] = (50, 80, 220),
ink_yellow: tuple[int, int, int] = (240, 200, 50),
ink_white: tuple[int, int, int] = (240, 240, 240),
thickness: float = 1.0,
margin: float = 0.04,
seed: int | None = None,
) -> None:
self.dim = dim
self.drawing = drawing
self.sub_wall = sub_wall
self.grid_step = grid_step Try running it locally
The reference implementation is self-contained Python with numpy. Install the package and run:
python library_external/generative_pioneers_2/sol_lewitt_wall_drawings/reference.py Need help? See Learn for the standard environment setup, or Playground for an in-browser sketchbook.
More from generative_pioneers_2
Computer-Aided Painting (Schwartz)
generative_pioneers_2 · lillian_schwartz
Lillian Schwartz, who worked at Bell Labs from 1968 to 2001 with Kenneth C.
Hypertransformations (Molnár)
generative_pioneers_2 · molnar_hypertransformations
Vera Molnár's 'Hypertransformations' (1974-1976), executed on the IBM 360 with a CRT 2250 display and output on a Benson plotter.
P-159 D (Mohr)
generative_pioneers_2 · mohr_p159d
Manfred Mohr's 'P-159 D' (1969, Vincennes) sits in the P-159 family that the artist developed from his earlier P-021 / P-036 line-arrangement programs.
Raster Sequence (Nake)
generative_pioneers_2 · nake_raster_sequence
Frieder Nake's 'Walk-through-Raster' / 'Raster Sequence' (1966) is the first non-stationary Markov chain in computer art history.
Structure Computer (Cohen / AARON)
generative_pioneers_2 · cohen_structure_computer
Harold Cohen's AARON, begun at UCSD in 1967-1973 and continuously developed until Cohen's death in 2016, is the longest-running art-making AI in history.
Text Rain (Utterback & Achituv)
generative_pioneers_2 · utterback_text_rain
Camille Utterback and Romy Achituv's 'Text Rain' (1999) is one of the canonical interactive installations of the late-1990s computer-vision era, and the piece that won them a US patent (US 6,928,313) in 2005.