DELETE THIS ONE LINE %! % This is a PostScript file that incorporates the device-independent % graphics commands that are described in section 2.3.1 of W. Taylor's % "The Geometry of Computer Graphics," Wadsworth & Brooks/Cole, 1991. % ISBN 0-534-17100-1. After this preamble of PS commands, one % simply incorporates one of Taylor's files. The only difference % is that text following a text command (t x T Z) must be set off % with a space and enclosed in parentheses. (Taylor's exact syntax % is impossible in PostScript, since it utilized the end-of-line % character, which is invisible to PostScript.) % % basic commands are these: % % % w xxx yyy uuu vvv lays down a coord syst with (xxx,yyy) at lower left % of paper, and with (uuu,vvv) at upper right. % Must use this before setting W g C % m xxx yyy moves to (xxx,yyy) % l xxx yyy makes a line to (xxx,yyy) % g uuu makes uuu the graylevel (0=black, 1 = white) % C rrr ggg bbb makes the current color Red =rrr, Green=ggg, Blue=bbb. % (effect somewhat unpredictable on B-W machines) % W uuu makes uuu the linewidth (1.0 a typical thin line) % P starts a polygon to be shaded % L xxx yyy vertex of polygon at (xxx,yyy) % q finishes and shades polygon % Q same as q but also black line surrounds polygon. % d xxx yyy ddd dot at (xxx,yyy) of size ddd. (3.0 typical small) % % T (any text) puts the indicated text at the current position, large % x (any text) puts the indicated text at the current position, medium % t (any text) puts the indicated text at the current position, small % % This version completed 2/5/93. It has not been tested very long. % Please save any files that cause errors. % % First comes the title, if one is desired: % You can change these coordinates in the obvious way. % 214.2 88.2 moveto /Times-Roman findfont 14 scalefont setfont ( Title ) show % %Then the designer's signature, if desired: % 396.0 72.0 moveto /Times-Roman findfont 8 scalefont setfont ( Picture made by: walter taylor ) show % /leftpoints 0.0 def /lowerpoints 180.0 def /horizpoints 612.0 def /vertpoints 612.0 def /leftvalue 0.0 def /lowervalue 0.0 def %default; w will change it /rightvalue 1.0 def /uppervalue 1.0 def %default; w will change it /needstroke {0} def /ccc {0} def %command identifier % /setmatrix { grestore gsave leftpoints lowerpoints translate horizpoints vertpoints scale 1 rightvalue leftvalue sub div 1 uppervalue lowervalue sub div scale 0 leftvalue sub 0 lowervalue sub translate } def % /WW { needstroke 1 ge {stroke} if uppervalue lowervalue sub vertpoints div mul setlinewidth /needstroke 0 def } def /gg { needstroke 1 ge {stroke} if setgray /needstroke {0} def} def /CC { needstroke 1 ge {stroke} if setrgbcolor /needstroke {0} def} def % /ww { /uppervalue exch def /rightvalue exch def /lowervalue exch def /leftvalue exch def setmatrix } def % /mm { needstroke 1 ge {stroke newpath} if moveto /needstroke {0} def } def % /ll { lineto /needstroke {1} def } def % /dd { needstroke 1 ge {stroke} if /needstroke {0} def newpath uppervalue lowervalue sub vertpoints div mul 0 360 arc fill stroke } def % /PP { needstroke 1 ge {stroke} if newpath /needstroke {0} def /needmove 1 def } def % /LL { needmove 1 eq { moveto } {lineto} ifelse /needmove 0 def } def % /QQ { closepath gsave fill grestore gsave 0.00 setgray stroke grestore } def % /qq { closepath fill } def % /TT { gsave needstroke 1 ge {stroke} if grestore /needstroke 1 def gsave /Times-Roman findfont 14 scalefont uppervalue lowervalue sub vertpoints div scalefont setfont show grestore } def /xx { gsave needstroke 1 ge {stroke} if grestore /needstroke 1 def gsave /Times-Roman findfont 10 scalefont uppervalue lowervalue sub vertpoints div scalefont setfont show grestore } def /tt { gsave needstroke 1 ge {stroke} if grestore /needstroke 1 def gsave /Times-Roman findfont 8 scalefont uppervalue lowervalue sub vertpoints div scalefont setfont show grestore } def /ZZ { print } def % /w { doit /ccc 1 def } def /W { doit /ccc 2 def } def /l { doit /ccc 3 def } def /m { doit /ccc 4 def } def /T { doit /ccc 5 def } def /x { doit /ccc 6 def } def /t { doit /ccc 7 def } def /Z { doit /ccc 8 def } def /g { doit /ccc 9 def } def /P { doit /ccc 10 def } def /L { doit /ccc 11 def } def /Q { doit /ccc 12 def } def /q { doit /ccc 13 def } def /d { doit /ccc 14 def } def /C { doit /ccc 15 def } def % /doit { ccc 1 eq {ww} if ccc 2 eq {WW} if ccc 3 eq {ll} if ccc 4 eq {mm} if ccc 5 eq {TT} if ccc 6 eq {xx} if ccc 7 eq {tt} if ccc 8 eq {ZZ} if ccc 9 eq {gg} if ccc 10 eq {PP} if ccc 11 eq {LL} if ccc 12 eq {QQ} if ccc 13 eq {qq} if ccc 14 eq {dd} if ccc 15 eq {CC} if } def % gsave %% warning: no loose gsaves after this one. setmatrix %This makes the default window 0 0 1 1 newpath W 0.6 % % Here put any number of forward W (width) w (window) % m (move) and l (line) commands. Also text commands t x T. % The command Z puts an entry onto the printer's log file. % One can also use g to change the gray level, and the special % P L L L L .... q syntax for a shaded polygon. The % P L L L L .... Q syntax is geometrically the same, but % it includes a dark line around the rectangle. % %%% BEGIN USER-SPECIFIED TEXT % % example follows: % w -100 -100 1100 1100 d 300 300 3.0 m 300 300 l 400 400 l 500 200 T (500 200) l 200 700 T (200 700) Z (\n\nwe got here\n\n) g .75 P L 0 0 L 50 0 L 50 50 L 0 50 Q m 850 850 C 0.9 0.3 0.2 T (xxx) m 1000 0 W 12.3 l 500 0 % %%% END USER-SPECIFIED TEXT % % the file must finish with this: doit needstroke 1 ge {stroke newpath} if showpage