70 XScreenSaver(1) XScreenSaver(1)
74 munch - munching squares screen hack
76 S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
77 d
\bde
\bec
\bco
\bo [-display _
\bh_
\bo_
\bs_
\bt_
\b:_
\bd_
\bi_
\bs_
\bp_
\bl_
\ba_
\by_
\b._
\bs_
\bc_
\br_
\be_
\be_
\bn] [-foreground _
\bc_
\bo_
\bl_
\bo_
\br]
78 [-background _
\bc_
\bo_
\bl_
\bo_
\br] [-window] [-root] [-mono] [-install]
79 [-visual _
\bv_
\bi_
\bs_
\bu_
\ba_
\bl] [-delay _
\bs_
\be_
\bc_
\bo_
\bn_
\bd_
\bs] [-xor] [-noxor] [-shift]
80 [-noshift] [-logminwidth _
\bm_
\bi_
\bn_
\bi_
\bm_
\bu_
\bm _
\bw_
\bi_
\bd_
\bt_
\bh]
82 D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
83 The _
\bm_
\bu_
\bn_
\bc_
\bh program preforms the munching squares hack until
84 killed. It picks square size, position, and gravity ran-
85 domly; configurable options are listed below.
87 The munching squares hack cosists of drawing Y = X XOR T
88 for a range of X and T over and over until all the possi-
89 ble combinations of X and T have come up. It was report-
90 edly discovered by Jackson Wright in 1962 and took 5
91 instructions of PDP-6 code.
93 O
\bOP
\bPT
\bTI
\bIO
\bON
\bNS
\bS
94 _
\bm_
\bu_
\bn_
\bc_
\bh accepts the following options:
96 -
\b-w
\bwi
\bin
\bnd
\bdo
\bow
\bw Draw on a newly-created window. This is the
99 -
\b-r
\bro
\boo
\bot
\bt Draw on the root window.
101 -
\b-m
\bmo
\bon
\bno
\bo If on a color display, pretend we're on a
104 -
\b-i
\bin
\bns
\bst
\bta
\bal
\bll
\bl
105 Install a private colormap for the window.
107 -
\b-v
\bvi
\bis
\bsu
\bua
\bal
\bl _
\bv_
\bi_
\bs_
\bu_
\ba_
\bl
108 Specify which visual to use. Legal values are the
109 name of a visual class, or the id number (decimal
110 or hex) of a specific visual.
112 -
\b-d
\bde
\bel
\bla
\bay
\by _
\bs_
\be_
\bc_
\bo_
\bn_
\bd_
\bs
113 How long to wait before starting over. Default 5
116 -
\b-x
\bxo
\bor
\br Use the XOR drawing function. (Default.)
118 -
\b-n
\bno
\bo-
\b-x
\bxo
\bor
\br Don't use the XOR drawing function.
120 -
\b-s
\bsh
\bhi
\bif
\bft
\bt Start drawing the square at weird starting points.
123 -
\b-n
\bno
\bo-
\b-s
\bsh
\bhi
\bif
\bft
\bt
124 Don't shift and start drawing the square at weird
130 X Version 11 17-Jun-97 1
136 XScreenSaver(1) XScreenSaver(1)
139 -
\b-l
\blo
\bog
\bgm
\bmi
\bin
\bnw
\bwi
\bid
\bdt
\bth
\bh _
\bm_
\bi_
\bn_
\bi_
\bm_
\bu_
\bm_
\b-_
\bw_
\bi_
\bd_
\bt_
\bh
140 The logarithm (base 2) of the minimum with of a
141 square (must be a power of 2, or some parts of the
144 E
\bEN
\bNV
\bVI
\bIR
\bRO
\bON
\bNM
\bME
\bEN
\bNT
\bT
145 D
\bDI
\bIS
\bSP
\bPL
\bLA
\bAY
\bY to get the default host and display number.
147 X
\bXE
\bEN
\bNV
\bVI
\bIR
\bRO
\bON
\bNM
\bME
\bEN
\bNT
\bT
148 to get the name of a resource file that overrides
149 the global resources stored in the RESOURCE_MAN-
152 S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
153 X
\bX(1), x
\bxs
\bsc
\bcr
\bre
\bee
\ben
\bns
\bsa
\bav
\bve
\ber
\br(1),
154 h
\bht
\btt
\btp
\bp:
\b:/
\b//
\b/w
\bww
\bww
\bw.
\b.i
\bin
\bnw
\bwa
\bap
\bp.
\b.c
\bco
\bom
\bm/
\b/p
\bpd
\bdp
\bp1
\b10
\b0/
\b/h
\bhb
\bba
\bak
\bke
\ber
\br/
\b/h
\bha
\bak
\bkm
\bme
\bem
\bm/
\b/h
\bha
\bak
\bkm
\bme
\bem
\bm.
\b.h
\bht
\btm
\bml
\bl,
\b,
155 h
\bht
\btt
\btp
\bp:
\b:/
\b//
\b/w
\bww
\bww
\bw.
\b.c
\bco
\bom
\bme
\bed
\bdi
\bia
\ba.
\b.c
\bco
\bom
\bm/
\b/H
\bHo
\bot
\bt/
\b/j
\bja
\bar
\brg
\bgo
\bon
\bn_
\b_3
\b3.
\b.0
\b0/
\b/J
\bJA
\bAR
\bRG
\bGO
\bON
\bN_
\b_M
\bM/
\b/M
\bMU
\bUN
\bNC
\bCH
\bH-
\b-
156 S
\bSQ
\bQR
\bR.
\b.H
\bHT
\bTM
\bML
\bL
158 H
\bHI
\bIS
\bST
\bTO
\bOR
\bRY
\bY
159 Quoted from HAKMEM, for historical interest. As that doc-
160 ument says, "Unless otherwise stated, all computer pro-
161 grams are in PDP-6/10 assembly language."
163 ITEM 146: MUNCHING SQUARES
164 Another simple display program. It is thought that
165 this was discovered by Jackson Wright on the RLE
174 2=X, 3=Y. Try things like 1001002 in data
175 switches. This also does interesting things with
176 operations other than XOR, and rotations other
177 than -22. (Try IOR; AND; TSC; FADR; FDV(!); ROT
180 ITEM 147 (Schroeppel):
181 Munching squares is just views of the graph Y = X
182 XOR T for consecutive values of T = time.
184 ITEM 148 (Cohen, Beeler):
185 A modification to munching squares which reveals
186 them in frozen states through opening and closing
187 curtains: insert FADR 2,1 before the XOR. Try data
190 4000,,4 1000,,2002 2000,,4 0,,1002
192 (Notation: <left half>,,<right half>)
196 X Version 11 17-Jun-97 2
202 XScreenSaver(1) XScreenSaver(1)
205 Also try the FADR after the XOR, switches =
208 C
\bCO
\bOP
\bPY
\bYR
\bRI
\bIG
\bGH
\bHT
\bT
209 Copyright (C) 1997 by Tim Showalter. Permission to use,
210 copy, modify, distribute, and sell this software and its
211 documentation for any purpose is hereby granted without
212 fee, provided that the above copyright notice appear in
213 all copies and that both that copyright notice and this
214 permission notice appear in supporting documentation. No
215 representations are made about the suitability of this
216 software for any purpose. It is provided "as is" without
217 express or implied warranty.
219 A
\bAU
\bUT
\bTH
\bHO
\bOR
\bR
220 Tim Showalter <tjs@andrew.cmu.edu>, 17-Jun-97, based on
221 what's in the Jargon File and stealing stuff from existing
222 xscreensaver modules.
262 X Version 11 17-Jun-97 3