# Munching square

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Munching_square
> Markdown URL: https://mediated.wiki/source/Munching_square.md
> Source: https://en.wikipedia.org/wiki/Munching_square
> Source revision: 1327248260
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|1962 display hack}}{{Distinguish|Marching squares}}thumb|Munching squares animation
thumb

The '''Munching Square''' is a [display hack](/source/display_hack) dating back to the [PDP-1](/source/PDP-1) (ca. 1962, reportedly discovered by [Jackson Wright](/source/Jackson_Wright)), which employs a trivial computation (repeatedly plotting the graph Y = X [XOR](/source/XOR) T for successive values of T<ref>{{cite web |url=http://home.pipeline.com/~hbaker1/hakmem/hacks.html#item146 |title=ITEM 146: MUNCHING SQUARES |website=HAKMEM |archive-url=https://web.archive.org/web/20190905202912/http://home.pipeline.com/~hbaker1/hakmem/hacks.html#item146 |archive-date=September 5, 2019 |url-status=dead}}</ref>) 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](/source/LISP_machine), have been christened munching triangles (using [bitwise AND](/source/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''.<ref>{{cite web|last=Raymond|first=Eric S.|authorlink=Eric S. Raymond|date=|title=munching squares|url=http://www.catb.org/jargon/html/M/munching-squares.html|accessdate=28 Feb 2013}}</ref>

==References==
{{reflist}}

== External links ==
* [http://www.computerhistory.org/collections/catalog/102664156 Video of the original Munching Squares demo running on a PDP-1]
* [http://mathworld.wolfram.com/MunchingSquares.html Munching Squares at] [MathWorld](/source/MathWorld)

==See also==
* [HAKMEM](/source/HAKMEM)
* The ''Munch'' module of the [open source](/source/Open-source_license) [XScreenSaver](/source/XScreenSaver) collection.

{{JargonFile|5.0.1}}

Category:History of software
Category:Screensavers
Category:Novelty software

{{Algorithm-stub}}

---
Adapted from the Wikipedia article [Munching square](https://en.wikipedia.org/wiki/Munching_square) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Munching_square?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
