Article · Wikipedia archive · Last revised Jun 20, 2026

Munching square

The Munching Square is a display hack dating back to the PDP-1, which employs a trivial computation to produce an impressive display of moving and growing squares that devour the screen. The initial value of T is treated as a parameter, which, when well-chosen, can produce intricate effects. Some of these, later (re)discovered on the LISP machine, have been christened munching triangles, munching w's, and munching mazes. More generally, suppose a graphics program produces an ever-changing display of some basic form, foo, on a display terminal, and does it using a relatively simple program; then the program is likely to be referred to as munching foos.

Last revised
Jun 20, 2026
Read time
≈ 1 min
Length
223 w
Citations
2
Source
Munching squares animation source ↗
source ↗

The Munching Square is a display hack dating back to the PDP-1 (ca. 1962, reportedly discovered by Jackson Wright), which employs a trivial computation (repeatedly plotting the graph Y = X XOR T for successive values of T1) to produce an impressive display of moving and growing squares that devour the screen. The initial value of T is treated as a parameter, which, when well-chosen, can produce intricate effects. Some of these, later (re)discovered on the LISP machine, have been christened munching triangles (using bitwise AND instead of XOR, and toggling points instead of plotting them), munching w's, and munching mazes. More generally, suppose a graphics program produces an ever-changing display of some basic form, foo, on a display terminal, and does it using a relatively simple program; then the program (or the resulting display) is likely to be referred to as munching foos.2

References

References

  1. "ITEM 146: MUNCHING SQUARES". HAKMEM. Archived from the original on September 5, 2019.
  2. Raymond, Eric S. "munching squares". Retrieved 28 Feb 2013.
External links
See also

See also

This article is based in part on the Jargon File, version 5.0.1, which is in the public domain.