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

NAME

6       munch - munching squares
7

SYNOPSIS

9       munch  [-display  host:display.screen] [-foreground color] [-background
10       color] [-window] [-root] [-mono] [-install]  [-visual  visual]  [-delay
11       usecs]  [-xor]  [-noxor]  [-clear  number]  [-simul number] [-classic |
12       -mismunch | -random] [-fps]
13

DESCRIPTION

15       The munch program performs the munching squares hack.  It picks  square
16       size,  position,  and  gravity randomly.  It also displays a creatively
17       broken misimplementation of the classic algorithm.
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 usecs
42               The  delay  between  steps  of  the animation, in microseconds.
43               Default: 2500.
44
45       -xor    Use the XOR drawing function.  This is the default.
46
47       -no-xor Don't use the XOR drawing function.
48
49       -clear number
50               Number of squares  to  misdraw  before  clearing  the  display.
51               Default: 65.
52
53       -simul number
54               Number of squares to misdraw simultaneously.  Default: 5.
55
56       -classic
57               Draw classic munching squares only.
58
59       -mismunch
60               Draw "mismunch" only.
61
62       -random Do one or the other.
63
64       -fps    Display the current frame rate and CPU load.
65

ENVIRONMENT

67       DISPLAY to get the default host and display number.
68
69       XENVIRONMENT
70               to  get  the  name of a resource file that overrides the global
71               resources stored in the RESOURCE_MANAGER property.
72

SEE ALSO

74       X(1), xscreensaver(1),
75       http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html
76

HISTORY

78       HAKMEM: MIT AI Memo 239, Feb. 29, 1972.
79               Beeler, M., Gosper, R.W., and Schroeppel, R.
80
81               "Unless otherwise stated, all computer programs are in PDP-6/10
82               assembly language."
83
84               ITEM 146: MUNCHING SQUARES
85
86                   Another simple display program. It is thought that this was
87                   discovered by Jackson Wright on the RLE PDP-1 circa 1962.
88
89                       DATAI 2
90                       ADDB 1,2
91                       ROTC 2,-22
92                       XOR 1,2
93                       JRST .-4
94                   2=X, 3=Y. Try things like 1001002 in  data  switches.  This
95                   also  does  interesting  things  with operations other than
96                   XOR, and rotations other than  -22.  (Try  IOR;  AND;  TSC;
97                   FADR; FDV(!); ROT -14, -9, -20, ...)
98
99               ITEM 147 (Schroeppel):
100
101                   Munching squares is just views of the graph Y = X XOR T for
102                   consecutive values of T = time.
103
104               ITEM 148 (Cohen, Beeler):
105
106                   A modification to munching squares which  reveals  them  in
107                   frozen  states through opening and closing curtains: insert
108                   FADR 2,1 before the XOR. Try data switches =
109
110                       4000,,4    1000,,2002    2000,,4    0,,1002
111                   (Notation: <left half>,,<right half>)
112                   Also try the FADR after the XOR, switches = 1001,,1.
113
115       Copyright 1997 Tim Showalter.
116       Copyright 2004 Steven Hazel.
117       Copyright 1992-2008 Jamie Zawinski.
118
119       Permission to use, copy, modify, distribute, and sell this software and
120       its  documentation  for any purpose is hereby granted without fee, pro‐
121       vided that the above copyright notice appear in  all  copies  and  that
122       both  that  copyright  notice and this permission notice appear in sup‐
123       porting documentation.  No representations are made about the suitabil‐
124       ity  of  this software for any purpose.  It is provided "as is" without
125       express or implied warranty.
126
127
128
129X Version 11               5.44-2.fc32 (16-Apr-2020)                 munch(6x)
Impressum