From: bau@cs.cornell.edu (David Bau) Date: Fri, 2 Oct 92 23:25:09 -0400 Subject: printer-maze.ps This unusual submission is for those mac users near postscript printers. After I put my after-dark maze screensaver on the archives there were many requests for a way of producing maze hardcopies. If you have a postscript printer, this is a cool way of doing it. Just send this postscript file to your printer, and it will randomly generate a maze and print it out. You have to make sure that the file begins with the %! line, and if you are having trouble getting mazes out of the file, use the program SendPS, in the info-mac archives. If you fiddle with the options at the top of the file, you can get multi-page mazes and even get the printer to solve the maze. If there is sufficient interest, I will repost my maze screensaver as well, which has since disappeared from info-mac. I also have other postscript toys which I can submit if people want them. David Bau bau@cs.cornell.edu }----- cut here -----{ %! true % Big labyrinth for postscript printers, by David Bau, 10/1/92 1 612 % horiz pages, pts/page % This file is free puzzleware :) Please pass it 1 792 % vert pages, pts/page % on only for free, and keep my original comments 18 % page margin (overlap) % intact. And if you really like it, email me or 12 % corridor size % send me a postscard from your town! 2 % corner/linecap style % 777 South Avenue 0.2 % wall thickness % Weston, MA 02193 0.5 % path thickness % bau@cs.cornell.edu 85 dict begin/J{bind def}bind def/A{def}J/`{0 1}J/r{for}J/m{pop}J/.{exch}/H{. A }/q{bitshift}/a{rand}/:{/v H/X H/W X 2 z A/S 0 v 2 z B A/Q S array A ` S R{p 15 x}r 1 1 W 2 y{= 2 x S ! z p 8 x}r W W S ! !{= 1 x R W z p 4 x}r Q Q ? 0 0 O W 1 O S W O S 1 O/C a X i d a v i d B A U 31 x{U W z e U ! e or U d e or U R e or{{ 4/D a 5 i A " D ne{U g z w 15 Y{u}t}t}h/_ 1 D q A/~ 1 D 2 xor q A _ C K/M C g z A Q M ? w ~ xor g neg W z d 5 q or x M}{C U w -5 q R ! z}o = w -5 q 0 Y{u}t/C H }h m/P * d A 0 P B $/N v * y A X N B $/s 0 P B A/E X N B d A/C s A/D 0 A{/_ U w A{3 1 0 I 0 2 1 I 1 4 2 I 2 8 3 I}h " U U w 31 and g d W z 5 q or x/C C g z A C E Y{u}t/D D d 4 i A}h}/p{Q .}/u{exit}/d{1 z}/y{sub}/t{if}/B{W mul z}/R{1 y}/U{Q C}/Y{eq}/x{put}/w{get}/i{mod}/S{W mul z}/o{ifelse}/h{loop}/l{idiv}/z{add}/-{and 0}/|{stroke}/'{moveto}/*{a v 7 l i}/K{p ? w 4 3 roll xor x}/={dup p}/!{W y}/?{2 copy}/I{D Y{_ - Y{m u}{/D H}o}{m m}o}/c{D Y{/g H}{m}o}/${dup 1 . K 4 . d K}/e{w 15 Y}/O{y 0 x}/+{Q k j B w}/&{C W i .5 y C W l .5 y}/G{setlinewidth}/V{` v d{/j H F ` X d{/k H + 2 - ne{n not{k R j #}t}{n{k R j ^}t}o}r |}r ` X d{/k H F ` v d {/j H + 1 - ne{n not{k j R #}t}{n{k j R ^}t}o}r |}r}/"{1 0 c W 1 c -1 2 c 0 ! 3 c}/b{dup f Z f mul y 2 div}/#{'/n true A}/,{/C s A & '{E/C U w -5 q R ! C z A & ? lineto | ' C Y{u}t}h}/F{false/n H}/da{div y 2 div z}/dt{translate}/^{lineto F }/ds{div dup scale}/dd{? ml z . mb z translate f f scale lc setlinecap T G V}/Z {div cvi}` 49{m J}r/; H/T H/lc H/f H/L H L y L y/hh H/ph H hh ph mul/rh H L y L y/ww H/pw H ww pw mul/rw H rw b/ml H rh b/mb H rw f Z rh f Z :{}0 hh neg rh neg d{0 ww neg rw neg d{L L dt dd showpage pop}r pop}r{ph pw gt{L ww rw ph da L dt 1 ph ds}{L L hh rh pw da dt 1 pw ds}o 0 0 dd pop pop ; G , showpage}o end