1munch(6x)                     XScreenSaver manual                    munch(6x)
2
3
4

NAME

6       munch - munching squares screen hack
7

SYNOPSIS

9       munch  [-display  host:display.screen] [-foreground color] [-background
10       color] [-window] [-root] [-mono] [-install]  [-visual  visual]  [-delay
11       microseconds] [-xor] [-noxor] [-shift] [-noshift] [-logminwidth minimum
12       width]
13

DESCRIPTION

15       The munch program performs the munching squares hack until killed.   It
16       picks square size, position, and gravity randomly; configurable options
17       are listed below.
18
19       The munching squares hack consists of drawing Y = X XOR T for  a  range
20       of X and T over and over until all the possible combinations of X and T
21       have come up.  It was reportedly discovered by Jackson Wright  in  1962
22       and took 5 instructions of PDP-6 code.
23

OPTIONS

25       munch accepts the following options:
26
27       -window Draw on a newly-created window.  This is the default.
28
29       -root   Draw on the root window.
30
31       -mono   If on a color display, pretend we're on a monochrome display.
32
33       -install
34               Install a private colormap for the window.
35
36       -visual visual
37               Specify  which  visual  to use.  Legal values are the name of a
38               visual class, or the id number (decimal or hex) of  a  specific
39               visual.
40
41       -delay microseconds
42               How long to wait before starting over.  Default 5000.
43
44       -xor    Use the XOR drawing function.  (Default.)
45
46       -no-xor Don't use the XOR drawing function.
47
48       -shift  Start drawing the square at weird starting points.  (Default.)
49
50       -no-shift
51               Don't  shift  and  start  drawing  the square at weird starting
52               points.
53
54       -logminwidth minimum-width
55               The logarithm (base 2) of the minimum with of a square (must be
56               a power of 2, or some parts of the square aren't.)
57

ENVIRONMENT

59       DISPLAY to get the default host and display number.
60
61       XENVIRONMENT
62               to  get  the  name of a resource file that overrides the global
63               resources stored in the RESOURCE_MANAGER property.
64

SEE ALSO

66       X(1),  xscreensaver(1),   http://www.inwap.com/pdp10/hbaker/hakmem/hak
67       mem.html, http://www.comedia.com/Hot/jargon_3.0/JARGON_M/MUNCHSQR.HTML
68

HISTORY

70       Quoted  from  HAKMEM,  for historical interest.  As that document says,
71       "Unless otherwise stated, all computer programs are in PDP-6/10  assem‐
72       bly language."
73
74       ITEM 146: MUNCHING SQUARES
75               Another  simple  display  program.  It is thought that this was
76               discovered by Jackson Wright on the RLE PDP-1 circa 1962.
77
78                   DATAI 2
79                   ADDB 1,2
80                   ROTC 2,-22
81                   XOR 1,2
82                   JRST .-4
83               2=X, 3=Y. Try things like 1001002 in data switches.  This  also
84               does  interesting  things  with  operations other than XOR, and
85               rotations other than -22. (Try IOR; AND; TSC; FADR; FDV(!); ROT
86               -14, -9, -20, ...)
87
88       ITEM 147 (Schroeppel):
89               Munching  squares  is  just  views of the graph Y = X XOR T for
90               consecutive values of T = time.
91
92       ITEM 148 (Cohen, Beeler):
93               A modification to munching squares which reveals them in frozen
94               states  through  opening  and closing curtains: insert FADR 2,1
95               before the XOR. Try data switches =
96
97                   4000,,4    1000,,2002    2000,,4    0,,1002
98               (Notation: <left half>,,<right half>)
99
100               Also try the FADR after the XOR, switches = 1001,,1.
101
103       Copyright © 1997 by Tim Showalter.  Permission to  use,  copy,  modify,
104       distribute,  and  sell this software and its documentation for any pur‐
105       pose is hereby granted without fee, provided that the  above  copyright
106       notice  appear  in  all  copies and that both that copyright notice and
107       this permission notice appear in supporting documentation.   No  repre‐
108       sentations are made about the suitability of this software for any pur‐
109       pose.  It is provided "as is" without express or implied warranty.
110

AUTHOR

112       Tim Showalter <tjs@andrew.cmu.edu>, 17-Jun-97, based on what's  in  the
113       Jargon File and stealing stuff from existing xscreensaver modules.
114
115
116
117X Version 11                 5.05-3 (06-Apr-2008)                    munch(6x)
Impressum