home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / m / m051 / 5.img / USERPROC.TX_ / USERPROC.bin
Encoding:
Text File  |  1992-05-15  |  78.3 KB  |  3,284 lines

  1. %%  --------------------------------------------------------------------
  2. %%  ----------- CORELDRAW USER-DEFINED FUNCTON FILE ---------------------
  3. %%  ------File name is: USERPROC.TXT------------------------------------
  4. %% NOTES:
  5. 10Aug89:ks updated documentation to reflect new format
  6.  
  7.     There are two types of user defined functions: "Spot" and "Fill"
  8.  
  9.     - A "Spot" function is a function that takes two floating point arguments,
  10.         X and Y, both between -1 and 1,  and returns a single real value between
  11.         -1 and 1 (otherwise an execution error occurs) called Z.
  12.         The domain is a 2 X 2 rectangle that will be mapped (at print time) into
  13.         each cell of the halftoning screen.
  14.         The 3-D representation of the function Z = f(X,Y) (does not need
  15.         to be continuous but f(X,Y) must be defined for all -1 <= X, Y <= 1 )
  16.         is a surface whose higher points will be whitened first in each cell.
  17.         For more information about spot functions, read section 4.8 of the
  18.         POSTSCRIPT LANGUAGE REFERENCE MANUAL (By Adobe Systems Inc.).
  19.  
  20.     - A Fill function takes between 0 and 5 arguments.  It assumes there is a
  21.         path already drawn (may be closed or not, may be disconnected) and
  22.         attempts to fill it.
  23.         A simple fill function could be:
  24.                 /MyFill1 { %0 parms
  25.                     .70 setgray fill } bind def
  26.         For more complex fills, the fill function may refer to the current
  27.         object's bounding box that is always defined in CORELDRAW units (1/1000)
  28.         of an inch and relative to the CORELDRAW logical origin.
  29.  
  30.         Globals Bbllx, Bblly, Bburx, Bbury can always be used to get the
  31.         object's bbox's lower left and upper right corners.
  32.  
  33.         NOTE 1: For objects with disconnected paths like multi-letter words
  34.         and disconnected lines & curves, the fill function will be called once
  35.         for each closed sub-path.  However, the object's bounding box remains
  36.         the same for each call.
  37.  
  38.         NOTE 2: When called by CORELDRAW, the fill function will be inside a
  39.         "gsave - grestore" sequence so that the fill function does not need to
  40.         restore the original graphics state.  Also, the fill function should
  41.         make no assumption about the current graphics state other than the
  42.         following:    - The current rotation angle is 0 (-90 for sideways pages)
  43.                         - The current unit is the MIL (1/1000 inch)
  44.                         - There is a path ready to be filled.
  45.  
  46. SYNTAX FOR THIS FILE:
  47.     - A function definition starts with a "%@Spot" or a "%@Fill" comment line
  48.     starting in column one indicating that a spot or a fill function is about
  49.      to be defined.  The remainder of the line is ignored.
  50.     - The line immediately following must start with the function name
  51.     immediately preceeded by a '/' (slash) in column one (eg: /MyFirstFill).
  52.     This name will be used to identify the fill in the .CDR file and the
  53.     .EPS files. The remainder of the line indicates the name that appears
  54.     in the custom function selection dialog box of CORELDRAW and the user
  55.     parameters for that function: Spot functions are not allowed any user
  56.     parameters just a display name. Fill functions are allowed from 0 to 5
  57.     parmeters specified as follows:
  58.  
  59.             %<userfnname>,<# of parms> ,<parmname1>=<default1>,<parmname2>=<default2>,...
  60.  
  61.             where: <userfnname> is the name that is displayed in the PSFILL selection
  62.                           list box, this is the string that is translated for
  63.                           foreign language versions
  64.              <# of parms> is an integer value between 0 and 5
  65.              <parmnameX> is the significance of parm X (string up to 20 chars)
  66.              <defaultX> is the default numeric value for that parm (always integer)
  67.             The number of parameter names & defaults must always match the
  68.             <# of parms> value.
  69.             Prior to calling that fill function, the main program will stack the
  70.             parameters in the same order they were specified.
  71.         ALL PARMS ARE INTEGERS.
  72.  
  73.         EXAMPLE:        a fill function with 3 parameters
  74.  
  75.         %@Fill
  76.         /MyFunction  %MyFunctionName,3,Background gray=100,Foreground gray=50,Density=4
  77.             {        % when called, STACK= <BackGray> <ForeGray> <Density>
  78.             /Density exch 1 10 InRange def        % validate density
  79.             /ForeGray exch 0 100 InRange def        % validate foreground gray
  80.             /BackGray exch 0 100 InRange def        % validate background gray
  81.             ...
  82.             } bind def
  83.  
  84.             NOTE: the 'InRange' PostScript function.
  85.             The main program cannot validate the range of the parameters.
  86.             The fill function can use the supplied function: 'InRange' which is
  87.             described below:
  88.                 <value> <min> <max> InRange  ==>  <newval>
  89.                 InRange takes 3 arguments from the stack, then makes sure that
  90.                 <value> is between <min> and <max>. If so, it leaves <value>
  91.                 on the stack, otherwise it pushes a valid <newval> on the stack.
  92.  
  93.             Note: The 'wDstChck' PostScript function.
  94.             In the case of a maximum value that equals a minimum value, the
  95.             difference will be null and in most cases will cause a devision by zero.
  96.             The fill function can use the supplied function: 'wDstChck'
  97.                         which is described below:
  98.                 <MaxValue> <MinValue> wDstChck ==> MaxValue or MaxValue+1
  99.                 If the 2 values are equal
  100.                               then add 1 to MaxValue and leave it on the stack
  101.                             else
  102.                               leave MaxValue unchanged on the stack.
  103.  
  104.     - The next n lines contain the function's body enclosed in curly
  105.     brackets and followed by a "bind def" sequence.
  106.     - The content of the body is not parsed by CORELDRAW.  A function definition is
  107.     terminated when the next '%@..." sequence is read or at the end of the file.
  108.     - Lines should not exceed 150 characters long.
  109.     - Function names should not exceed 20 characters.
  110.     - Parameter names should not exceed 20 characters.
  111.     - There is no limit for the number of lines in each function.
  112.  
  113.  
  114. %@Spot
  115. /Dot2 %Dot2
  116.         { %def --SPOT FUNCTION : DOT2: black around cells
  117.         dup mul exch dup mul add 1 sub
  118.         } bind def
  119.  
  120. %@Spot
  121. /OutCircleBlk %OutCircleBlk
  122.         { %def --SPOT FUNCTION : OUTCIRCLE: empty black circles
  123.         dup mul exch dup mul add
  124.         0.6 exch sub abs -0.5 mul
  125.         } bind def
  126.  
  127. %@Spot
  128. /OutCircleWhi %OutCircleWhi
  129.         { %def --SPOT FUNCTION : OUTCIRCLE: empty black circles
  130.         dup mul exch dup mul add
  131.         0.6 exch sub abs 0.5 mul
  132.         } bind def
  133.  
  134. %@Spot
  135. /Diamond %Diamond
  136.         { %def --SPOT FUNCTION : DIAMOND
  137.         abs exch abs add 1 exch sub
  138.         } bind def
  139.  
  140. %@Spot
  141. /MicroWaves %MicroWaves
  142.         { %def --SPOT FUNCTION : MICROWAVES
  143.         /wy exch def
  144.         180 mul cos 2 div wy dup dup dup mul mul sub mul wy add
  145.         180 mul cos
  146.         } bind def
  147.  
  148. %@Spot
  149. /Grid %Grid
  150.         { % A SQUARE GRID
  151.         2 copy
  152.         abs exch abs
  153.         gt {exch} if
  154.         pop 2 mul 1 exch sub 3.5 div
  155.         } bind def
  156.  
  157. %@Spot
  158. /Lines %Lines
  159.         { % STRAIGHT LINES
  160.         pop abs 2 mul 1 exch sub
  161.         } bind def
  162.  
  163. %@Spot
  164. /Star %Star
  165.      {
  166.      abs exch abs
  167.      2 copy gt {exch} if
  168.      1  sub
  169.     dup 0 eq {0.01 add}if
  170.      atan 360 div
  171.      } bind def
  172.  
  173. %----------------------------------------------------------------------------
  174.  
  175. %@Fill
  176. /Archimedes %Archimedes,4, Frequency=8, LineWidth=5, ForegroundGray=100, BackgroundGray=0
  177.    {
  178.    /BackgroundGray exch -1 100 InRange def
  179.    /ForegroundGray exch 0 100 InRange def
  180.    /Linewidth      exch 0 100 InRange def
  181.    /Frequency      exch 2 100 InRange def
  182.  
  183.    /newfont 10 dict def
  184.    newfont begin
  185.  
  186.    /FontMatrix [3 sqrt 1 add 1 exch div  0  0
  187.                3 sqrt 1 add 1 exch div  0  0] def
  188.    /FontType 3 def
  189.    /FontBBox [0 0 3 sqrt 1 add 3 sqrt 1 add] def
  190.    /Encoding 256 array def
  191.    0 1 255 {Encoding exch /.notdef put} for
  192.  
  193.    /BuildChar
  194.      { 3 sqrt 1 add  0
  195.        -0.1 -0.1 3 sqrt 1.1 add 3 sqrt 1.1 add
  196.        setcachedevice
  197.        pop begin
  198.  
  199.        0 0 moveto
  200.        1 2 div  0 lineto
  201.        0  3 sqrt 2 div lineto
  202.        3 sqrt 2 div  3 sqrt 1 add 2 div lineto
  203.        0  3 sqrt 2 div 1 add lineto
  204.        0  3 sqrt 2 div lineto
  205.  
  206.        0  3 sqrt 2 div 1 add moveto
  207.        1 2 div  3 sqrt 1 add lineto
  208.        3 sqrt 1 add 2 div  3 sqrt 1 2 div add lineto
  209.        3 sqrt 2 div  3 sqrt 1 add 2 div lineto
  210.        3 sqrt 2 div 1 add  3 sqrt 1 add 2 div lineto
  211.        3 sqrt 1 add 2 div  3 sqrt 1 2 div add lineto
  212.        3 sqrt 1 2 div add  3 sqrt 1 add lineto
  213.        3 sqrt 1 add  3 sqrt 2 div 1 add lineto
  214.        3 sqrt 2 div 1 add  3 sqrt 1 add 2 div lineto
  215.        3 sqrt 1 add  3 sqrt 2 div lineto
  216.        3 sqrt 1 2 div add  0 lineto
  217.        3 sqrt 1 add 2 div  1 2 div lineto
  218.        3 sqrt 2 div 1 add  3 sqrt 1 add 2 div lineto
  219.  
  220.        3 sqrt 1 add 2 div  3 sqrt 1 add moveto
  221.        3 sqrt 1 add 2 div  3 sqrt 1 2 div add lineto
  222.  
  223.        3 sqrt 1 add 2 div  0  moveto
  224.        3 sqrt 1 add 2 div  1 2 div lineto
  225.  
  226.        1 2 div  0 moveto
  227.        3 sqrt 1 add 2 div  1 2 div lineto
  228.        3 sqrt 2 div  3 sqrt 1 add 2 div lineto
  229.  
  230.        3 sqrt 1 2 div add  0 moveto
  231.        3 sqrt 1 add  0 lineto
  232.  
  233.        3 sqrt 1 2 div add  3 sqrt 1 add moveto
  234.        3 sqrt 1 add  3 sqrt 1 add lineto
  235.  
  236.        0  3 sqrt 1 add moveto
  237.        1 2 div  3 sqrt 1 add lineto
  238.  
  239.        3 sqrt 1 add  3 sqrt 2 div moveto
  240.        3 sqrt 1 add  3 sqrt 2 div 1 add lineto
  241.  
  242.        Linewidth pntsize div 3 sqrt 1 add mul setlinewidth
  243.        stroke
  244.  
  245.       end
  246.      } def
  247.    end
  248.  
  249.    /pntsize 2000 Frequency div def
  250.    /FillFont newfont definefont pop
  251.    /FillFont findfont pntsize scalefont setfont
  252.  
  253.    eoclip
  254.    BackgroundGray 0 ge
  255.       { BackgroundGray 100 div 1 exch sub setgray fill }
  256.       { newpath } ifelse
  257.  
  258.    ForegroundGray 100 div 1 exch sub setgray
  259.  
  260.    Bblly pntsize Bbury
  261.      { Bbllx pntsize Bburx
  262.        { 1 index moveto
  263.        (a) show
  264.        } for
  265.      pop
  266.      } for
  267.    } bind def
  268.  
  269. %@Fill
  270. /Bars %Bars,4, Width=10, Spacing(%)=100, MaximumGray=100, MinimumGray=10
  271.    {
  272.    /MinGrey exch 0 100 InRange def
  273.    /MaxGrey exch MinGrey 100 InRange def
  274.    /Spacing exch 0 300 InRange def
  275.    /Width exch 1 100 InRange def
  276.  
  277.    /dgrey MaxGrey MinGrey sub def
  278.    /inc 1 Spacing 100 div add def
  279.  
  280.    eoclip newpath
  281.  
  282.    currentscreen
  283.    3 -1 roll
  284.    pop 90
  285.    3 1 roll
  286.    setscreen
  287.  
  288.    Bbllx Bblly translate
  289.    /dx Bburx Bbllx sub Width div def
  290.    /dy Bbury Bblly sub Width div def
  291.    Width 10 mul dup scale
  292.    /mtx matrix currentmatrix def
  293.    .05 setlinewidth
  294.  
  295.    0 inc dx
  296.      { 0 translate
  297.       -.5 .05 .5
  298.          { dup 0 moveto
  299.            dup dy lineto
  300.            dup mul 0.250001 exch sub sqrt 2 mul
  301.            dgrey mul MaxGrey exch sub 100 div 1 exch sub setgray
  302.            stroke
  303.          } for
  304.       mtx setmatrix
  305.       } for
  306.    dx 0 translate
  307.    90 rotate
  308.    /mtx matrix currentmatrix def
  309.    0 inc dy
  310.      { 0 translate
  311.       -.5 .05 .5
  312.          { dup 0 moveto
  313.            dup dx lineto
  314.            dup mul 0.250001 exch sub sqrt 2 mul
  315.            dgrey mul MaxGrey exch sub 100 div 1 exch sub setgray
  316.            stroke
  317.          } for
  318.       mtx setmatrix
  319.       } for
  320.    } bind def
  321.  
  322. %@Fill
  323. /Basketweave %Basketweave,4, Frequency=6, LineWidth=10, ForegroundGray=100, WeaveWidth(%)=100
  324.    {
  325.    /Width exch 1 200 InRange def
  326.    /Grey exch 0 100 InRange def
  327.    /LineWidth exch 0 100 InRange def
  328.    /Frequency exch 1 100 InRange def
  329.  
  330.    /dif Width 100 sub 100 div def
  331.  
  332.    /newfont 10 dict def
  333.    newfont begin
  334.  
  335.    /FontMatrix [.25  0
  336.                 0    .25
  337.                 0    0] def
  338.    /FontType 3 def
  339.    /FontBBox [0 0 4 4] def
  340.    /Encoding 256 array def
  341.    0 1 255 {Encoding exch /.notdef put} for
  342.    Encoding 97 /Holes put
  343.    Encoding 98 /Weave put
  344.  
  345.    /CharProcs 3 dict def
  346.    CharProcs begin
  347.    /.notdef {} def
  348.    /Holes
  349.       {
  350.       1 dif moveto
  351.       2 dif sub 1 lineto
  352.       1 2 dif sub lineto
  353.       dif 1 lineto
  354.       closepath
  355.       fill
  356.  
  357.       3 2 dif add moveto
  358.       4 dif sub 3 lineto
  359.       3 4 dif sub lineto
  360.       2 dif add 3 lineto
  361.       closepath
  362.       fill
  363.       } def
  364.    /Weave
  365.       {
  366.       0 3 dif add moveto
  367.       1 dif sub 4 lineto
  368.  
  369.       0 1 dif add moveto
  370.       1 dif lineto
  371.  
  372.       3 dif sub 4 moveto
  373.       4 dif sub 3 lineto
  374.  
  375.       1 dif sub 0 moveto
  376.       2 dif sub 1 lineto
  377.  
  378.       4 3 dif add moveto
  379.       3 2 dif add lineto
  380.  
  381.       3 dif sub 0 moveto
  382.       1 2 dif sub lineto
  383.  
  384.       4 1 dif add moveto
  385.       2 dif add 3 lineto
  386.  
  387.       dif 1 moveto
  388.       3 4 dif sub lineto
  389.  
  390.       LineWidth 100 div setlinewidth
  391.       stroke
  392.       } def
  393.    end
  394.  
  395.    /BuildChar
  396.      { 4  0
  397.        -0.1 -0.1 4.1 4.1
  398.        setcachedevice
  399.        exch begin
  400.        Encoding exch get
  401.        CharProcs exch get
  402.        end
  403.        exec
  404.      } def
  405.    end
  406.  
  407.    /pntsize 1000 Frequency div def
  408.  
  409.    /FillFont newfont definefont pop
  410.    /FillFont findfont pntsize scalefont setfont
  411.  
  412.    eoclip newpath
  413.  
  414.    Grey 100 div 1 exch sub setgray
  415.    Bblly pntsize Bbury
  416.      { Bbllx exch moveto
  417.        { (a) show
  418.          currentpoint
  419.          pop Bburx gt
  420.          {exit} if
  421.        } loop
  422.      } for
  423.  
  424.    0 setgray
  425.    Bblly pntsize Bbury
  426.      { Bbllx exch moveto
  427.        { (b) show
  428.          currentpoint
  429.          pop Bburx gt
  430.          {exit} if
  431.        } loop
  432.      } for
  433.  
  434.    } bind def
  435.  
  436. %@Fill
  437. /Birds %Birds,4, Frequency=8, LineWidth=4, ForegroundGray=100, BackgroundGray=0
  438.    {
  439.    /BackgroundGray exch -1 100 InRange def
  440.    /ForegroundGray exch 0 100 InRange def
  441.    /Linewidth      exch 0 100 InRange def
  442.    /Frequency      exch 2 100 InRange def
  443.  
  444.    /newfont 10 dict def
  445.    newfont begin
  446.  
  447.    /FontMatrix [1 162 div  0
  448.                 0         1 162 div
  449.                 0         0] def
  450.    /FontType 3 def
  451.    /FontBBox [-92 -150 46 12] def
  452.    /Encoding 256 array def
  453.    0 1 255 {Encoding exch /.notdef put} for
  454.  
  455.    /BuildChar
  456.      { 138  0
  457.        -92 -150 46 12
  458.        setcachedevice
  459.        pop begin
  460.  
  461.        -92 -150 moveto
  462.        -92 12   lineto
  463.        46  12   lineto
  464.        46 -150  lineto
  465.        closepath
  466.        clip
  467.        newpath
  468.  
  469.        2 {
  470.          gsave
  471.          3 {
  472.            -10 -8 moveto
  473.            60 24  -54 60  -9 72 curveto
  474.            -2.5 73.7  11.5 70.3  29 75.4 curveto
  475.  
  476.            -54 6 moveto
  477.            -45 14  -27 16  -18 18 curveto
  478.            27 27  -81 54  -9 90 curveto
  479.  
  480.            -126 9 moveto
  481.            -114 27  -66 66  -54 24 curveto
  482.            -53 21  -49 15  -43 12 curveto
  483.  
  484.            [ -1     0
  485.               0     1
  486.               0     0 ] concat
  487.              135 -81 translate
  488.          } repeat
  489.  
  490.        Linewidth pntsize div 162 mul setlinewidth
  491.        stroke
  492.        grestore
  493.        138 0 translate
  494.  
  495.      } repeat
  496.  
  497.      end
  498.      } def
  499.    end
  500.  
  501.    /pntsize 1174 Frequency div def
  502.  
  503.    /FillFont newfont definefont pop
  504.    /FillFont findfont pntsize scalefont setfont
  505.  
  506.    eoclip
  507.    BackgroundGray 0 ge
  508.       { BackgroundGray 100 div 1 exch sub setgray fill }
  509.       { newpath } ifelse
  510.  
  511.    ForegroundGray 100 div 1 exch sub setgray
  512.  
  513.     Bblly pntsize Bbury
  514.         { Bbllx exch moveto
  515.         { (a) show
  516.           currentpoint
  517.           pop Bburx gt
  518.           {exit} if
  519.         } loop
  520.       } for
  521.     } bind def
  522.  
  523. %@Fill
  524. /Bricks %Bricks,4, Frequency=8, LineWidth=5, ForegroundGray=100, BackgroundGray=0
  525.    {
  526.    /BackgroundGray exch -1 100 InRange def
  527.    /ForegroundGray exch 0 100 InRange def
  528.    /Linewidth      exch 0 100 InRange def
  529.    /Frequency      exch 2 100 InRange def
  530.  
  531.    /newfont 10 dict def
  532.    newfont begin
  533.  
  534.    /FontMatrix [1  0  0
  535.                 1  0  0] def
  536.    /FontType 3 def
  537.    /FontBBox [0 0 1 1] def
  538.    /Encoding 256 array def
  539.    0 1 255 {Encoding exch /.notdef put} for
  540.  
  541.    /BuildChar
  542.      { 1  0
  543.        -0.1 -0.1 1.1 1.1
  544.        setcachedevice
  545.        pop begin
  546.  
  547.        0 0 moveto
  548.        1 0 lineto
  549.        1 .5 lineto
  550.        0 .5 lineto
  551.        closepath
  552.        .5 .5 moveto
  553.        .5 1 lineto
  554.  
  555.        Linewidth pntsize div setlinewidth
  556.        stroke
  557.  
  558.       end
  559.      } def
  560.    end
  561.  
  562.    /pntsize 1000 Frequency div def
  563.  
  564.    /FillFont newfont definefont pop
  565.    /FillFont findfont pntsize scalefont setfont
  566.  
  567.    eoclip
  568.    BackgroundGray 0 ge
  569.       { BackgroundGray 100 div 1 exch sub setgray fill }
  570.       { newpath } ifelse
  571.  
  572.    ForegroundGray 100 div 1 exch sub setgray
  573.  
  574.    Bblly pntsize Bbury
  575.      { Bbllx exch moveto
  576.        { (a) show
  577.          currentpoint
  578.          pop Bburx gt
  579.          {exit} if
  580.        } loop
  581.      } for
  582.    } bind def
  583.  
  584. %@Fill
  585. /Bubbles %Bubbles,5, Number(sq_inch)=25, MaxSize=300, MinSize=10, LineWidth=10, RandomSeed=0
  586.    { srand
  587.    /LineWidth exch 0 50 InRange def
  588.    /MinSize exch 1 1000 InRange def
  589.    /MaxSize exch MinSize 1000 InRange def
  590.    /Number exch 1 250 InRange def
  591.  
  592.    eoclip
  593.    newpath
  594.    /pntsize MaxSize MinSize div cvi def
  595.    /dx Bburx Bbllx sub def
  596.    /dy Bbury Bblly sub def
  597.  
  598.    dx dy mul Number mul 1000000 div cvi
  599.    {  rand dx mod Bbllx add
  600.       rand dy mod Bblly add
  601.       rand pntsize mod 1 add pntsize exch div MinSize mul
  602.       3 copy
  603.       2 index add
  604.       exch
  605.       moveto
  606.       pop
  607.       0 360 arc
  608.       gsave
  609.       0 setgray
  610.       LineWidth setlinewidth
  611.       stroke
  612.       grestore
  613.       1 setgray
  614.       fill
  615.       } repeat
  616.  
  617.    } bind def
  618.  
  619. %@Fill
  620. /Carpet %Carpet,5, Frequency(dpi)=72, Gray=100, Gamma(box_size)=50, ModFactor=3, Alpha=10
  621.    {
  622.    /Alpha exch def
  623.    /Modf exch def
  624.    /Gamma exch def
  625.    /Grey exch 0 100 InRange def
  626.    /Frequency exch 10 300 InRange def
  627.  
  628.    /Beta1 -10 def
  629.    /Beta2 -15 def
  630.  
  631.    eoclip newpath
  632.  
  633.    /wz 360 def
  634.    2 1 Gamma sqrt
  635.       { dup Gamma exch mod
  636.       0 eq { dup wz exch mod
  637.            0 eq { /wz wz 2 index div cvi def
  638.                 } if
  639.            } if
  640.       pop
  641.       } for
  642.  
  643.    /newfont 10 dict def
  644.    newfont begin
  645.  
  646.    /FontMatrix [1 wz div  0
  647.                 0          1 wz div
  648.                 0          0] def
  649.    /FontType 3 def
  650.    /FontBBox [0 0 wz wz] def
  651.    /Encoding 256 array def
  652.    0 1 255 {Encoding exch /.notdef put} for
  653.  
  654.    /BuildChar
  655.      { wz  0
  656.        -0.1 -0.1 wz 0.1 add wz 0.1 add
  657.        setcachedevice
  658.        pop begin
  659.  
  660.       0 1 wz
  661.          { 0 1 wz
  662.             { 1 index 2 copy
  663.             Gamma mul Beta2 add sin
  664.             exch Gamma mul Beta1 add sin
  665.             add Alpha mul cvi Modf mod
  666.             0 eq { moveto
  667.                   1 0 rlineto
  668.                   0 1 rlineto
  669.                   -1 0 rlineto
  670.                   closepath
  671.                   fill }
  672.                  { pop pop } ifelse
  673.             }   for
  674.          pop
  675.          } for
  676.  
  677.        end
  678.      } def
  679.    end
  680.  
  681.    /pntsize wz 1000 mul Frequency div def
  682.  
  683.    /FillFont newfont definefont pop
  684.    /FillFont findfont pntsize scalefont setfont
  685.  
  686.    Grey 100 div 1 exch sub setgray
  687.    Bblly pntsize Bbury
  688.      { Bbllx 1 index moveto
  689.        { (a) show
  690.          currentpoint
  691.          dup 3 index sub
  692.          pntsize 2 div gt { pntsize sub } if
  693.          1 index Bburx gt
  694.          {pop pop pop exit} if
  695.          moveto
  696.        } loop
  697.      } for
  698.    } bind def
  699.  
  700. %@Fill
  701. /CircleGrid %CircleGrid,5, Frequency=6, LineWidth1=6, LineWidth2=6, Gray1=40, Gray2=40
  702.    {
  703.    /Grey2 exch -1 100 InRange def
  704.    /Grey1 exch -1 100 InRange def
  705.    /LineWidth2 exch 0 100 InRange def
  706.    /LineWidth1 exch 0 100 InRange def
  707.    /Frequency exch 1 72 InRange def
  708.  
  709.    /newfont 10 dict def
  710.    newfont begin
  711.  
  712.    /FontMatrix [1 3 sqrt 3 mul div  0
  713.                 0                   1 3 sqrt 3 mul div
  714.                 0                   0] def
  715.    /FontType 3 def
  716.    /FontBBox [0 0 2 3 sqrt 3 mul] def
  717.  
  718.    /Encoding 256 array def
  719.    0 1 255 {Encoding exch /.notdef put} for
  720.    Encoding 97 /OneCircle put
  721.    Encoding 98 /OneCircleFilled put
  722.    Encoding 99 /TwoCircles put
  723.    Encoding 100 /TwoCirclesFilled put
  724.  
  725.    /CharProcs 5 dict def
  726.    CharProcs begin
  727.    /.notdef {} def
  728.    /OneCircle
  729.      { 1 3 sqrt 2 div add  3 sqrt 5 mul 2 div moveto
  730.        1  3 sqrt 5 mul 2 div  3 sqrt 2 div 0 360 arc
  731.  
  732.        LineWidth1 pntsize div 3 sqrt 3 mul mul setlinewidth
  733.        stroke
  734.    } def
  735.  
  736.    /OneCircleFilled
  737.      { 1 3 sqrt 2 div add  3 sqrt 5 mul 2 div moveto
  738.        1  3 sqrt 5 mul 2 div  3 sqrt 2 div 0 350 arc
  739.  
  740.        fill
  741.    } def
  742.  
  743.    /TwoCircles
  744.      { 1 3 sqrt 2 div add  3 sqrt 2 div moveto
  745.        1 3 sqrt 2 div dup 0 360 arc
  746.  
  747.        1 3 sqrt 2 div add  3 sqrt 3 mul 2 div moveto
  748.        1  3 sqrt 3 mul 2 div  3 sqrt 2 div 0 360 arc
  749.  
  750.        LineWidth2 pntsize div 3 sqrt 3 mul mul setlinewidth
  751.        stroke
  752.    } def
  753.  
  754.    /TwoCirclesFilled
  755.      { 1 3 sqrt 2 div add  3 sqrt 2 div moveto
  756.        1 3 sqrt 2 div dup 0 360 arc
  757.  
  758.        1 3 sqrt 2 div add  3 sqrt 3 mul 2 div moveto
  759.        1  3 sqrt 3 mul 2 div  3 sqrt 2 div 0 360 arc
  760.  
  761.        fill
  762.    } def
  763.  
  764.    end
  765.  
  766.    /BuildChar
  767.      {3 2 div  3 sqrt 3 mul 2 div
  768.       -0.1 -0.1 2.1  3 sqrt 3 mul 0.1 add
  769.       setcachedevice
  770.       exch begin
  771.       Encoding exch get
  772.       CharProcs exch get
  773.       end
  774.       exec
  775.      }def
  776.    end
  777.  
  778.    /pntsize 3000 Frequency div def
  779.  
  780.    /FillFont newfont definefont pop
  781.    /FillFont findfont pntsize scalefont setfont
  782.  
  783.    /Bbllx Bbllx pntsize sub def
  784.    /Bblly Bblly pntsize sub def
  785.    /Bburx Bburx pntsize add def
  786.    /Bbury Bbury pntsize add def
  787.  
  788.    eoclip newpath
  789.  
  790.    Grey1 0 ge
  791.       { Grey1 100 div 1 exch sub setgray
  792.       Bblly pntsize Bbury
  793.         { Bbllx 1 index moveto
  794.           { (b) show
  795.             currentpoint
  796.             dup 3 index sub
  797.             pntsize 2.1 div gt { pntsize sub } if
  798.             1 index Bburx gt
  799.             {pop pop pop exit} if
  800.             moveto
  801.           } loop
  802.        } for
  803.       } if
  804.  
  805.    Grey2 0 ge
  806.       { Grey2 100 div 1 exch sub setgray
  807.       Bblly pntsize Bbury
  808.         { Bbllx 1 index moveto
  809.           { (d) show
  810.             currentpoint
  811.             dup 3 index sub
  812.             pntsize 2.1 div gt { pntsize sub } if
  813.             1 index Bburx gt
  814.             {pop pop pop exit} if
  815.             moveto
  816.           } loop
  817.         } for
  818.       } if
  819.  
  820.    LineWidth1 0 gt
  821.       { 0 setgray
  822.       Bblly pntsize Bbury
  823.         { Bbllx 1 index moveto
  824.           { (a) show
  825.             currentpoint
  826.             dup 3 index sub
  827.             pntsize 2.1 div gt { pntsize sub } if
  828.             1 index Bburx gt
  829.             {pop pop pop exit} if
  830.             moveto
  831.           } loop
  832.         } for
  833.       } if
  834.  
  835.    LineWidth2 0 gt
  836.       { 0 setgray
  837.       Bblly pntsize Bbury
  838.         { Bbllx 1 index moveto
  839.           { (c) show
  840.             currentpoint
  841.             dup 3 index sub
  842.             pntsize 2.1 div gt { pntsize sub } if
  843.             1 index Bburx gt
  844.             {pop pop pop exit} if
  845.             moveto
  846.           } loop
  847.         } for
  848.       } if
  849.  
  850.    } bind def
  851.  
  852. %@Fill
  853. /Construction %Construction,4, Frequency=8, LineWidth=5, ForegroundGray=100, BackgroundGray=0
  854.    {
  855.    /BackgroundGray exch -1 100 InRange def
  856.    /ForegroundGray exch 0 100 InRange def
  857.    /Linewidth      exch 0 100 InRange def
  858.    /Frequency      exch 2 100 InRange def
  859.  
  860.    /newfont 10 dict def
  861.    newfont begin
  862.  
  863.    /FontMatrix  [ .1     0
  864.                   0      .1
  865.                   0      0] def
  866.    /FontType 3 def
  867.    /FontBBox [-1 -1 9.66 11] def
  868.    /Encoding 256 array def
  869.    0 1 255 {Encoding exch /.notdef put} for
  870.  
  871.    /BuildChar
  872.      { 8.66 5
  873.        -1 -1 9.66 11
  874.        setcachedevice
  875.        pop begin
  876.  
  877.        1 0 moveto
  878.        0 0 1 -60 300 arc
  879.        3 sqrt 5 mul .5 add  5 3 sqrt 2 div sub lineto
  880.        3 sqrt 5 mul  5  1  -60 420 arc
  881.        .5  10 3 sqrt 2 div add lineto
  882.        0 10 1 60 180 arc
  883.        -1 0 lineto
  884.  
  885.        -.5 3 sqrt 2 div moveto
  886.        3 sqrt 5 mul .5 sub  5 3 sqrt 2 div add lineto
  887.        3 sqrt 5 mul .5 sub  5 3 sqrt 2 div sub moveto
  888.        -.5  10 3 sqrt 2 div sub lineto
  889.        1 10 moveto
  890.        1 0 lineto
  891.  
  892.        Linewidth pntsize div 10 mul setlinewidth
  893.        stroke
  894.       end
  895.      } def
  896.    end
  897.  
  898.    /pntsize 1126 Frequency div def
  899.    /FillFont newfont definefont pop
  900.    /FillFont findfont pntsize scalefont setfont
  901.  
  902.    /Bbllx Bbllx pntsize sub def
  903.  
  904.    eoclip
  905.    BackgroundGray 0 ge
  906.       { BackgroundGray 100 div 1 exch sub setgray fill }
  907.       { newpath } ifelse
  908.  
  909.    ForegroundGray 100 div 1 exch sub setgray
  910.  
  911.    Bblly pntsize Bbury
  912.      { Bbllx 1 index moveto
  913.        { (a) show
  914.          currentpoint
  915.          dup 3 index sub
  916.          pntsize 2.1 div gt { pntsize sub } if
  917.          1 index Bburx gt
  918.          {pop pop pop exit} if
  919.          moveto
  920.        } loop
  921.      } for
  922.    } bind def
  923.  
  924. %@Fill
  925. /Cracks %Cracks,5, Number=20, MaxLength=125, MinLength=75, StepLength=14, LineWidth=5
  926.    {
  927.    /LineWidth exch 0 100 InRange def
  928.    /StepLength exch 1 100 InRange def
  929.    /MinLength exch 1 300 InRange def
  930.    /MaxLength exch MinLength 300 InRange MinLength wDstChck def
  931.    /Number exch 1 100 InRange def
  932.  
  933.    eoclip newpath
  934.  
  935.    /dx Bburx Bbllx sub def
  936.    /dy Bbury Bblly sub def
  937.  
  938.    Number {
  939.       gsave
  940.       /theta rand 360 mod def
  941.  
  942.       rand dx mod Bbllx add
  943.       rand dy mod Bblly add
  944.       moveto
  945.  
  946.       StepLength dup scale
  947.       LineWidth StepLength div setlinewidth
  948.  
  949.       MinLength
  950.       MaxLength MinLength sub
  951.       rand 1 index mod 2 index add
  952.          {
  953.          currentpoint translate
  954.          rand 120 mod 60 sub theta add dup rotate
  955.          0 0 moveto
  956.          1 0 lineto
  957.          stroke
  958.          1 0 moveto
  959.          neg rotate
  960.          } repeat
  961.       grestore
  962.       pop pop
  963.       } repeat
  964.    } bind def
  965.  
  966. %@Fill
  967. /Craters %Craters,5, Number=15, MaximumSize=300, MinimumSize=75, BackgroundGray=0, RandomSeed=0
  968.    { srand
  969.    /BackgroundGrey exch 0 100 InRange def
  970.    /MinSize exch 1 500 InRange def
  971.    /MaxSize exch MinSize 500 InRange MinSize wDstChck def
  972.    /Number exch 1 50 InRange def
  973.  
  974.    eoclip
  975.    BackgroundGrey 100 div 1 exch sub setgray
  976.    fill
  977.  
  978.    /pntsize 333 def
  979.    /dx Bburx Bbllx sub def
  980.    /dy Bbury Bblly sub def
  981.    /DifSize MaxSize MinSize sub cvi def
  982.  
  983.    Bbllx Bblly translate
  984.  
  985.    matrix currentmatrix
  986.    dx dy mul 1000000 div Number mul cvi {
  987.       dup
  988.       rand dx mod  rand dy mod  translate
  989.       /size rand DifSize mod MinSize add def
  990.       0 0 size .7 mul  0 360 arc
  991.       BackgroundGrey 100 div 1 exch sub setgray fill
  992.  
  993.       0
  994.          { rand 18 mod add 10 add
  995.          dup 360 gt { pop exit } if
  996.          dup rotate
  997.          size 5 div  0 moveto
  998.          rand 300 mod 200 add 500 div size mul  0 lineto
  999.          dup neg rotate
  1000.          } loop
  1001.  
  1002.       0 setgray
  1003.       1 setlinewidth
  1004.       stroke
  1005.       setmatrix
  1006.       } repeat
  1007.    pop
  1008.    } bind def
  1009.  
  1010. %@Fill
  1011. /Crosshatching %Crosshatching,5, MaxDistance=75, MinDistance=0, LineWidth=5, Angle=45, Random Seed=0
  1012.    { srand
  1013.    /Angle exch -180 180 InRange def
  1014.    /LineWidth exch 0 100 InRange def
  1015.    /MinDist exch 0 500 InRange def
  1016.    /MaxDist exch MinDist 500 InRange MinDist wDstChck def
  1017.  
  1018.    eoclip
  1019.    newpath
  1020.  
  1021.    /pntsize MaxDist MinDist sub def
  1022.    /dx2 Bburx Bbllx sub 2 div def
  1023.    /dy2 Bbury Bblly sub 2 div def
  1024.    /hyp2 dx2 dup mul dy2 dup mul add sqrt def
  1025.  
  1026.    Bbllx Bblly translate
  1027.    dx2 dy2 translate
  1028.    Angle rotate
  1029.    LineWidth setlinewidth
  1030.  
  1031.    /wd hyp2 neg def
  1032.       { /wd rand pntsize mod MinDist add wd add def
  1033.       wd hyp2 neg moveto
  1034.       wd hyp2 lineto
  1035.       stroke
  1036.       wd hyp2 gt {exit} if
  1037.       } loop
  1038.  
  1039.    Angle -2 mul rotate
  1040.    /wd hyp2 neg def
  1041.       { /wd rand pntsize mod MinDist add wd add def
  1042.       wd hyp2 neg moveto
  1043.       wd hyp2 lineto
  1044.       stroke
  1045.       wd hyp2 gt {exit} if
  1046.       } loop
  1047.  
  1048.    } bind def
  1049.  
  1050. %@Fill
  1051. /CrystalLattice %CrystalLattice,4, Frequency=4, BackGray=100, FrontGray=0, Scaling(%)=75
  1052.    {
  1053.    /Scaling exch 10 100 InRange def
  1054.    /FrontGrey exch 0 100 InRange def
  1055.    /BackGrey exch -100 100 InRange def
  1056.    /Frequency exch 1 50 InRange def
  1057.  
  1058.    /newfont 10 dict def
  1059.    newfont begin
  1060.  
  1061.    /FontMatrix [1                   0
  1062.                 0                   1
  1063.                 0                   0] def
  1064.    /FontType 3 def
  1065.    /FontBBox [0 0 1 1] def
  1066.    /Encoding 256 array def
  1067.    0 1 255 {Encoding exch /.notdef put} for
  1068.  
  1069.    /BuildChar
  1070.      { 1 0
  1071.        -0.1 -0.1 1.1 1.1
  1072.        setcachedevice
  1073.        pop begin
  1074.  
  1075.        gsave
  1076.        0 0 moveto
  1077.        3 { 1 0 lineto
  1078.          currentpoint translate
  1079.          90 rotate
  1080.          } repeat
  1081.        closepath
  1082.        .05 setlinewidth
  1083.        stroke
  1084.        grestore
  1085.  
  1086.        gsave
  1087.        4 { .2 0 moveto
  1088.          0 0 .2 0 360 arc
  1089.          fill
  1090.          1 0 translate
  1091.          90 rotate
  1092.          } repeat
  1093.        grestore
  1094.  
  1095.        end
  1096.      } def
  1097.    end
  1098.  
  1099.    /pntsize 1000 Frequency div cvi def
  1100.  
  1101.    /FillFont newfont definefont pop
  1102.    /FillFont findfont pntsize scalefont setfont
  1103.  
  1104.    /dx Bburx Bbllx sub def
  1105.    /dy Bbury Bblly sub def
  1106.  
  1107.    eoclip newpath
  1108.  
  1109.    currentscreen
  1110.    3 -1 roll
  1111.    pop 120
  1112.    3 1 roll
  1113.    setscreen
  1114.  
  1115.    Bbllx dx 2 div add  Bblly dy 2 div add translate
  1116.  
  1117.    /dx dx 100 mul Scaling div def
  1118.    /dy dy 100 mul Scaling div def
  1119.  
  1120.    Scaling 100 div dup scale
  1121.    100 Scaling div log 10 div 10 exch exp
  1122.    BackGrey 0 100 InRange 100 div  FrontGrey BackGrey sub 1000 div  FrontGrey .1 sub 100 div
  1123.       { 1 exch sub setgray
  1124.       dup dup scale
  1125.       dy 2 div cvi dup pntsize mod pntsize 2 div sub sub neg
  1126.         pntsize   dy pntsize add 2 div
  1127.         { dx 2 div cvi dup pntsize mod pntsize 2 div sub sub neg
  1128.           1 index moveto
  1129.           { (a) show
  1130.             currentpoint
  1131.             dup 3 index sub
  1132.             pntsize 2.1 div gt { pntsize sub } if
  1133.             1 index dx pntsize add 2 div gt
  1134.             { pop pop pop exit } if
  1135.             moveto
  1136.           } loop
  1137.         } for
  1138.       } for
  1139.       pop
  1140.    } bind def
  1141.  
  1142. %@Fill
  1143. /Denim %Denim,5, Frequency=72, MaxGray=100, MinGray=0, HalftoneScreen=60, RandomSeed=0
  1144.    { srand
  1145.    /Screen exch 30 300 InRange def
  1146.    /MinGrey exch 0 100 InRange def
  1147.    /MaxGrey exch MinGrey 100 InRange def
  1148.    /Frequency exch 1 300 InRange def
  1149.  
  1150.    eoclip newpath
  1151.  
  1152.    currentscreen
  1153.    3 -1 roll
  1154.    pop Screen
  1155.    3 1 roll
  1156.    setscreen
  1157.  
  1158.    /dx Bburx Bbllx sub def
  1159.    /dy Bbury Bblly sub def
  1160.    /wf Frequency 1000 div def
  1161.    /dgrey MaxGrey MinGrey sub 100 div def
  1162.  
  1163.    Bbllx Bblly translate
  1164.    /str 512 string def
  1165.  
  1166.    dx wf mul cvi 1 add  dy wf mul cvi 1 add  8  [wf 0 0 wf 0 0]
  1167.       { dgrey MinGrey 2.55 mul
  1168.       0 1 511
  1169.          { str exch
  1170.          rand -11 bitshift 255 and 4 index mul 3 index add cvi
  1171.          put
  1172.          } for
  1173.       pop pop
  1174.       str
  1175.      }image
  1176.  
  1177.    } bind def
  1178.  
  1179. %@Fill
  1180. /DNA %DNA,5, Frequency=4, LineWidth=1, ForegroundGray=100, BackgroundGray=0, Spacing(%)=100
  1181.    {
  1182.    /Spacing        exch 1 300 InRange def
  1183.    /BackgroundGray exch -1 100 InRange def
  1184.    /ForegroundGray exch 0 100 InRange def
  1185.    /Linewidth      exch 0 100 InRange def
  1186.    /Frequency      exch 1 100 InRange def
  1187.  
  1188.    /newfont 10 dict def
  1189.    newfont begin
  1190.  
  1191.    /FontMatrix [1 360 div           0
  1192.                 0                   1 360 div
  1193.                 0                   0] def
  1194.    /FontType 3 def
  1195.    /FontBBox [-20 0 20 360] def
  1196.    /Encoding 256 array def
  1197.    0 1 255 {Encoding exch /.notdef put} for
  1198.  
  1199.    /BuildChar
  1200.      { Spacing 110
  1201.        -20  0 20 360
  1202.        setcachedevice
  1203.        pop begin
  1204.  
  1205.        Linewidth pntsize mul 110 div setlinewidth
  1206.        0 0 moveto
  1207.        0 1 360
  1208.           { dup sin 20 mul exch lineto
  1209.           } for
  1210.        stroke
  1211.        20 0 moveto
  1212.        0 1 360
  1213.           { dup cos 20 mul exch lineto
  1214.           } for
  1215.        stroke
  1216.        0 20 360
  1217.           { dup dup sin 20 mul exch moveto
  1218.           dup cos 20 mul exch lineto
  1219.           } for
  1220.        stroke
  1221.  
  1222.        end
  1223.      } def
  1224.    end
  1225.  
  1226.    /pntsize 2000 Frequency div def
  1227.  
  1228.    /FillFont newfont definefont pop
  1229.    /FillFont findfont pntsize scalefont setfont
  1230.  
  1231.    eoclip
  1232.    BackgroundGray 0 ge
  1233.       { BackgroundGray 100 div 1 exch sub setgray fill }
  1234.       { newpath } ifelse
  1235.  
  1236.    ForegroundGray 100 div 1 exch sub setgray
  1237.  
  1238.    Bblly pntsize sub pntsize Bbury pntsize add
  1239.      { Bbllx 1 index moveto
  1240.        { (a) show
  1241.          currentpoint
  1242.          dup 3 index sub
  1243.          pntsize 2.1 div gt { pntsize sub } if
  1244.          1 index Bburx gt
  1245.          {pop pop pop exit} if
  1246.          moveto
  1247.        } loop
  1248.      } for
  1249.    } bind def
  1250.  
  1251. %@Fill
  1252. /Fishscale %Fishscale,4, Frequency=8, LineWidth=5, ForegroundGray=100, BackgroundGray=0
  1253.    {
  1254.    /BackgroundGray exch -1 100 InRange def
  1255.    /ForegroundGray exch 0 100 InRange def
  1256.    /Linewidth      exch 0 100 InRange def
  1257.    /Frequency      exch 2 100 InRange def
  1258.  
  1259.    /newfont 10 dict def
  1260.    newfont begin
  1261.  
  1262.    /FontMatrix [1  0  0
  1263.                 1  0  0] def
  1264.    /FontType 3 def
  1265.    /FontBBox [0 0 1 1] def
  1266.    /Encoding 256 array def
  1267.    0 1 255 {Encoding exch /.notdef put} for
  1268.  
  1269.    /BuildChar
  1270.      { 1  0
  1271.        0 0 1 1
  1272.        setcachedevice
  1273.        pop begin
  1274.  
  1275.        0.5 0.5 0.5 360 180 arcn
  1276.        0 1 0.5 270 360 arc
  1277.        1 1 0.5 180 270 arc
  1278.  
  1279.        Linewidth pntsize div setlinewidth
  1280.        stroke
  1281.  
  1282.       end
  1283.      } def
  1284.    end
  1285.  
  1286.    /pntsize 1000 Frequency div def
  1287.    /FillFont newfont definefont pop
  1288.    /FillFont findfont pntsize scalefont setfont
  1289.  
  1290.    eoclip
  1291.    BackgroundGray 0 ge
  1292.       { BackgroundGray 100 div 1 exch sub setgray fill }
  1293.       { newpath } ifelse
  1294.  
  1295.    ForegroundGray 100 div 1 exch sub setgray
  1296.  
  1297.     Bblly pntsize Bbury
  1298.       { Bbllx exch moveto
  1299.         { (a) show
  1300.           currentpoint
  1301.           pop Bburx gt
  1302.           {exit} if
  1303.         } loop
  1304.       } for
  1305.     } bind def
  1306.  
  1307.  
  1308. %@Fill
  1309. /Grass %Grass,5, Number=100, MaximumSize=35, MinimumSize=7, Gray=0, RandomSeed=0
  1310.     { srand
  1311.     /Grey exch -1 100 InRange def
  1312.     /MinSize exch 1 100 InRange def
  1313.     /MaxSize exch MinSize 100 InRange MinSize wDstChck def
  1314.     /Number exch 1 500 InRange def
  1315.  
  1316.     eoclip
  1317.     Grey 0 ge
  1318.        { Grey 100 div 1 exch sub setgray fill }
  1319.        { newpath } ifelse
  1320.  
  1321.     /Bbllx Bbllx MaxSize sub def
  1322.     /Bblly Bblly MaxSize sub def
  1323.  
  1324.     /dx Bburx Bbllx sub def
  1325.     /dy Bbury Bblly sub def
  1326.     /dSize MaxSize MinSize sub def
  1327.  
  1328.     dx dy mul 1000000 div Number mul cvi
  1329.        {
  1330.  
  1331.        matrix currentmatrix
  1332.  
  1333.        rand dx mod Bbllx add
  1334.        rand dy mod Bblly add
  1335.        translate
  1336.  
  1337.        rand dSize mod MinSize add
  1338.        dup scale
  1339.  
  1340.        -0.5 0 moveto
  1341.        rand 14 mod 7 sub
  1342.        -0.5 3  2 index 3 div 0.3 sub 10  4 index 10 curveto
  1343.        3 div 0.3 add 10 0.5 3 0.5 0 curveto
  1344.        gsave
  1345.        1 setgray
  1346.        fill
  1347.        grestore
  1348.        0.1 setlinewidth
  1349.        0 setgray
  1350.        stroke
  1351.  
  1352.        setmatrix
  1353.  
  1354.        } repeat
  1355.  
  1356.      } bind def
  1357.  
  1358. %@Fill
  1359. /Hatching %Hatching,5, MaxDistance=75, MinDistance=0, LineWidth=5, Angle=45, RandomSeed=0
  1360.    { srand
  1361.    /Angle exch -180 180 InRange def
  1362.    /LineWidth exch 0 100 InRange def
  1363.    /MinDist exch 0 500 InRange def
  1364.    /MaxDist exch MinDist 500 InRange MinDist wDstChck def
  1365.  
  1366.    eoclip
  1367.    newpath
  1368.  
  1369.    /pntsize MaxDist MinDist sub def
  1370.    /dx2 Bburx Bbllx sub 2 div def
  1371.    /dy2 Bbury Bblly sub 2 div def
  1372.    /hyp2 dx2 dup mul dy2 dup mul add sqrt def
  1373.  
  1374.    Bbllx Bblly translate
  1375.    dx2 dy2 translate
  1376.    Angle rotate
  1377.    LineWidth setlinewidth
  1378.  
  1379.    /wd hyp2 neg def
  1380.  
  1381.       { /wd rand pntsize mod MinDist add wd add def
  1382.       wd hyp2 neg moveto
  1383.       wd hyp2 lineto
  1384.       stroke
  1385.       wd hyp2 gt {exit} if
  1386.       } loop
  1387.  
  1388.    } bind def
  1389.  
  1390. %@Fill
  1391. /Hexagons %Hexagons,4, Frequency=8, LineWidth=5, ForegroundGray=100, BackgroundGray=0
  1392.    {
  1393.    /BackgroundGray exch -1 100 InRange def
  1394.    /ForegroundGray exch 0 100 InRange def
  1395.    /LineWidth      exch 0 100 InRange def
  1396.    /Frequency      exch 2 100 InRange def
  1397.  
  1398.    /newfont 10 dict def
  1399.    newfont begin
  1400.  
  1401.    /FontMatrix [1 3 sqrt div        0
  1402.                 0                   1 3 sqrt div
  1403.                 0                   0] def
  1404.    /FontType 3 def
  1405.    /FontBBox [0 0 2 3 sqrt] def
  1406.    /Encoding 256 array def
  1407.    0 1 255 {Encoding exch /.notdef put} for
  1408.  
  1409.    /BuildChar
  1410.      { 3 2 div  3 sqrt 2 div
  1411.        -0.1 -0.1 2.1 3 sqrt 0.1 add
  1412.        setcachedevice
  1413.        pop begin
  1414.  
  1415.        1 2 div  0 moveto
  1416.        3 2 div  0 lineto
  1417.        2  3 sqrt 2 div lineto
  1418.        3 2 div  3 sqrt lineto
  1419.        1 2 div  3 sqrt lineto
  1420.        0  3 sqrt 2 div lineto
  1421.        closepath
  1422.  
  1423.        LineWidth pntsize div 3 sqrt mul setlinewidth
  1424.        stroke
  1425.  
  1426.       end
  1427.      } def
  1428.    end
  1429.  
  1430.    /pntsize 1155 Frequency div def
  1431.    /FillFont newfont definefont pop
  1432.    /FillFont findfont pntsize scalefont setfont
  1433.  
  1434.    eoclip
  1435.    BackgroundGray 0 ge
  1436.       { BackgroundGray 100 div 1 exch sub setgray fill }
  1437.       { newpath } ifelse
  1438.  
  1439.    ForegroundGray 100 div 1 exch sub setgray
  1440.  
  1441.    Bblly pntsize Bbury
  1442.      { Bbllx 1 index moveto
  1443.        { (a) show
  1444.          currentpoint
  1445.          dup 3 index sub
  1446.          pntsize 2 div gt { pntsize sub } if
  1447.          1 index Bburx gt
  1448.          {pop pop pop exit} if
  1449.          moveto
  1450.        } loop
  1451.      } for
  1452.    } bind def
  1453.  
  1454. %@Fill
  1455. /Honeycomb %Honeycomb,5, Frequency=4, BackGray=100, FrontGray=0, Scaling(%)=75, LineWidth=5
  1456.    {
  1457.    /LineWidth exch 0 100 InRange def
  1458.    /Scaling exch 10 100 InRange def
  1459.    /FrontGrey exch 0 100 InRange def
  1460.    /BackGrey exch -100 100 InRange def
  1461.    /Frequency exch 1 50 InRange def
  1462.  
  1463.    /newfont 10 dict def
  1464.    newfont begin
  1465.  
  1466.    /FontMatrix [1 3 sqrt div        0
  1467.                 0                   1 3 sqrt div
  1468.                 0                   0] def
  1469.    /FontType 3 def
  1470.    /FontBBox [0 0 2 3 sqrt] def
  1471.    /Encoding 256 array def
  1472.    0 1 255 {Encoding exch /.notdef put} for
  1473.  
  1474.    /BuildChar
  1475.      { 3 2 div  3 sqrt 2 div
  1476.        -0.1 -0.1 2.1 3 sqrt 0.1 add
  1477.        setcachedevice
  1478.        pop begin
  1479.  
  1480.        1 2 div  0 moveto
  1481.        3 2 div  0 lineto
  1482.        2  3 sqrt 2 div lineto
  1483.        3 2 div  3 sqrt lineto
  1484.        1 2 div  3 sqrt lineto
  1485.        0  3 sqrt 2 div lineto
  1486.        closepath
  1487.  
  1488.        LineWidth pntsize div 3 sqrt mul setlinewidth
  1489.        stroke
  1490.  
  1491.       end
  1492.      } def
  1493.    end
  1494.  
  1495.    /pntsize 1000 Frequency div cvi def
  1496.  
  1497.    /FillFont newfont definefont pop
  1498.    /FillFont findfont pntsize scalefont setfont
  1499.  
  1500.    /dx Bburx Bbllx sub def
  1501.    /dy Bbury Bblly sub def
  1502.  
  1503.    eoclip newpath
  1504.  
  1505.    currentscreen
  1506.    3 -1 roll
  1507.    pop 120
  1508.    3 1 roll
  1509.    setscreen
  1510.  
  1511.    Bbllx dx 2 div add  Bblly dy 2 div add translate
  1512.  
  1513.    /dx dx 100 mul Scaling div def
  1514.    /dy dy 100 mul Scaling div def
  1515.  
  1516.    Scaling 100 div dup scale
  1517.    100 Scaling div log 10 div 10 exch exp
  1518.    BackGrey 0 100 InRange 100 div  FrontGrey BackGrey sub 1000 div  FrontGrey .1 sub 100 div
  1519.       { 1 exch sub setgray
  1520.       dup dup scale
  1521.       dy 2 div cvi dup pntsize mod pntsize 2 div sub sub neg
  1522.         pntsize   dy pntsize add 2 div
  1523.         { dx 2 div cvi dup pntsize mod pntsize 2 div sub sub neg
  1524.           1 index moveto
  1525.           { (a) show
  1526.             currentpoint
  1527.             dup 3 index sub
  1528.             pntsize 2.1 div gt { pntsize sub } if
  1529.             1 index dx pntsize add 2 div gt
  1530.             { pop pop pop exit } if
  1531.             moveto
  1532.           } loop
  1533.         } for
  1534.       } for
  1535.    pop
  1536.    } bind def
  1537.  
  1538. %@Fill
  1539. /Impact %Impact,5, LineWidth=5, StepLength=15, MaximumAngle=40, MinimumAngle=10, RandomSeed=0
  1540.    { srand
  1541.    /MinAng exch 2 90 InRange def
  1542.    /MaxAng exch MinAng 90 InRange MinAng wDstChck def
  1543.    /Step exch 10 500 InRange def
  1544.    /Linewidth exch 0 100 InRange def
  1545.  
  1546.    eoclip
  1547.    newpath
  1548.  
  1549.    /dx Bburx Bbllx sub def
  1550.    /dy Bbury Bblly sub def
  1551.    /DifAng MaxAng MinAng sub def
  1552.  
  1553.    Bbllx Bblly translate
  1554.  
  1555.    dx 2 div  dy 2 div  translate
  1556.    Linewidth Step div setlinewidth
  1557.    Step Step scale
  1558.  
  1559.    /theta 0 def
  1560.       { matrix currentmatrix
  1561.       /theta theta rand DifAng mod add MinAng add def
  1562.       theta 360 gt {pop exit} if
  1563.       theta rotate
  1564.       0 0 moveto
  1565.       rand 150 mod 50 add
  1566.          {
  1567.          currentpoint translate
  1568.          rand 120 mod 60 sub theta add dup rotate
  1569.          1 0 lineto
  1570.          neg rotate
  1571.          } repeat
  1572.       stroke
  1573.       setmatrix
  1574.       } loop
  1575.    } bind def
  1576.  
  1577.  
  1578. %@Fill
  1579. /Landscape %Landscape,4, Depth=6, MaximumGray=100, MinimumGray=0, RandomSeed=0
  1580.    {
  1581.    srand
  1582.    /MinGrey exch 0 100 InRange def
  1583.    /MaxGrey exch MinGrey 100 InRange def
  1584.    /maxdepth exch 1 7 InRange def
  1585.  
  1586.    /dGrey MaxGrey MinGrey sub 200 div def
  1587.    /AvGrey MaxGrey MinGrey add 200 div def
  1588.  
  1589.    eoclip newpath
  1590.    /depth 0 def
  1591.    /ardepth 2 maxdepth 1 sub exp cvi def
  1592.    /height 1.8 8 maxdepth sub exp def
  1593.  
  1594.    /horz 0 def
  1595.    /vert 0 def
  1596.    /Array ardepth 1 add array def
  1597.    0 1 ardepth
  1598.       { Array exch ardepth 1 add array put
  1599.       } for
  1600.    0 1 ardepth
  1601.       { Array exch get
  1602.       0 1 ardepth
  1603.          { 2 copy 0 put
  1604.          pop
  1605.          } for
  1606.       pop
  1607.       } for
  1608.  
  1609.    /Square
  1610.       {
  1611.       /depth depth 1 add def
  1612.       depth maxdepth eq
  1613.       {
  1614.       Array horz get vert get dup 1 add dup moveto                    %ur
  1615.       Array horz 1 add get vert get dup 1 add lineto             %ul
  1616.       Array horz 1 add get vert 1 add get dup dup lineto         %ll
  1617.       Array horz get vert 1 add get dup 1 add exch lineto             %lr
  1618.       closepath
  1619.       sub
  1620.       dGrey mul AvGrey add
  1621.       setgray
  1622.       fill }
  1623.  
  1624.       {
  1625.       /wd 2 maxdepth depth sub 1 sub exp cvi def
  1626.  
  1627.       Array horz wd 2 mul add get vert wd 2 mul add get
  1628.       Array horz get vert wd 2 mul add get
  1629.       Array horz wd 2 mul add get vert get
  1630.       Array horz get vert get
  1631.  
  1632.       4 copy add add add 4 div
  1633.             rand 50 mod 25 sub height div 2 depth exp div add
  1634.       Array horz wd add get
  1635.             vert wd add 2 index put  pop
  1636.  
  1637.       3 index 2 index add 2 div
  1638.             rand 50 mod 25 sub height div 2 depth exp div add
  1639.       Array horz wd 2 mul add get
  1640.             vert wd add 2 index put   pop
  1641.  
  1642.       3 index 3 index add 2 div
  1643.             rand 50 mod 25 sub height div 2 depth exp div add
  1644.       Array horz wd add get
  1645.             vert wd 2 mul add 2 index put   pop
  1646.  
  1647.       horz 0 eq
  1648.       { 2 index 1 index add 2 div
  1649.             rand 50 mod 25 sub height div 2 depth exp div add
  1650.       Array horz get
  1651.             vert wd add 2 index put    pop
  1652.       } if
  1653.  
  1654.       vert 0 eq
  1655.       { 1 index 1 index add 2 div
  1656.             rand 50 mod 25 sub height div 2 depth exp div add
  1657.       Array horz wd add get
  1658.             vert 2 index put          pop
  1659.       } if
  1660.  
  1661.       pop pop pop pop
  1662.       .5 .5 translate
  1663.       .5 .5 scale
  1664.       Square
  1665.       2 2 scale
  1666.  
  1667.       /horz horz 2 maxdepth depth sub 1 sub exp cvi add def
  1668.       -.5 0 translate
  1669.       .5 .5 scale
  1670.       Square
  1671.       2 2 scale
  1672.       /horz horz 2 maxdepth depth sub 1 sub exp cvi sub def
  1673.  
  1674.       /vert vert 2 maxdepth depth sub 1 sub exp cvi add def
  1675.       .5 -.5 translate
  1676.       .5 .5 scale
  1677.       Square
  1678.       2 2 scale
  1679.       /vert vert 2 maxdepth depth sub 1 sub exp cvi sub def
  1680.  
  1681.       /horz horz 2 maxdepth depth sub 1 sub exp cvi add def
  1682.       /vert vert 2 maxdepth depth sub 1 sub exp cvi add def
  1683.       -.5 0 translate
  1684.       .5 .5 scale
  1685.       Square
  1686.       2 2 scale
  1687.       /horz horz 2 maxdepth depth sub 1 sub exp cvi sub def
  1688.       /vert vert 2 maxdepth depth sub 1 sub exp cvi sub def
  1689.  
  1690.       } ifelse
  1691.       /depth depth 1 sub def
  1692.  
  1693.    } def
  1694.  
  1695.    /dx Bburx Bbllx sub def
  1696.    /dy Bbury Bblly sub def
  1697.    /hyp dx dup mul dy dup mul add sqrt def
  1698.    Bbllx dx 2 div add  Bblly dy 2 div add translate
  1699.    hyp 1.2 mul dup scale
  1700.    45 rotate
  1701.    -.5 -.5 translate
  1702.  
  1703.    currentscreen
  1704.    3 -1 roll
  1705.    pop 120
  1706.    3 1 roll
  1707.    setscreen
  1708.  
  1709.    0 0 0 0
  1710.    Square
  1711.    4{ pop }repeat
  1712.  
  1713.    } bind def
  1714.  
  1715. %@Fill
  1716. /Leaves %Leaves,5, Number(sq_inch)=50, MaximumGray=100, MinimumGray=0, MaximumSize=100, MinimumSize=10
  1717.    {
  1718.    /MinSize exch 1 200 InRange def
  1719.    /MaxSize exch MinSize 200 InRange MinSize wDstChck def
  1720.    /MinGrey exch 0 100 InRange def
  1721.    /MaxGrey exch MinGrey 100 InRange def
  1722.    /Number exch 1 250 InRange def
  1723.  
  1724.    eoclip newpath
  1725.    currentscreen
  1726.    3 -1 roll
  1727.    pop 90
  1728.    3 1 roll
  1729.    setscreen
  1730.  
  1731.    /dx Bburx Bbllx sub def
  1732.    /dy Bbury Bblly sub def
  1733.  
  1734.    dx dy mul Number mul 1000000 div cvi
  1735.       {
  1736.       matrix currentmatrix
  1737.  
  1738.       rand dx mod Bbllx add
  1739.       rand dy mod Bblly add
  1740.       translate
  1741.  
  1742.       rand 360 mod
  1743.       rotate
  1744.  
  1745.       MaxSize MinSize eq
  1746.         { Maxsize 10.8 div }
  1747.         { rand MaxSize MinSize sub mod MinSize add 10.8 div } ifelse
  1748.       dup scale
  1749.  
  1750.       17 0 moveto
  1751.       65 -18 106 -13 125 0 curveto
  1752.       106 13  65  18  17 0 curveto
  1753.       gsave
  1754.       MaxGrey MinGrey eq
  1755.         { MaxGrey 100 div }
  1756.         { rand MaxGrey MinGrey sub mod MinGrey add 100 div } ifelse
  1757.       setgray
  1758.       fill
  1759.       grestore
  1760.       0.3 setlinewidth
  1761.       0 setgray
  1762.       stroke
  1763.  
  1764.       setmatrix
  1765.  
  1766.       } repeat
  1767.  
  1768.    } bind def
  1769.  
  1770. %@Fill
  1771. /Mesh %Mesh,5, Frequency=6, SquareSize(%)=80, ShadowLowerLeft=3, ShadowUpperRight=15, ForegroundGray=100
  1772.    {
  1773.    /ForegroundGray exch 0 100 InRange def
  1774.    /Shadow2 exch 0 100 InRange def
  1775.    /Shadow1 exch 0 100 InRange def
  1776.    /SquareSize exch 1 100 InRange def
  1777.    /Frequency exch 1 25 InRange def
  1778.  
  1779.    /newfont 10 dict def
  1780.    newfont begin
  1781.  
  1782.    /FontMatrix [1         0
  1783.                 0         1
  1784.                 0         0] def
  1785.    /FontType 3 def
  1786.    /FontBBox [0 0 1 1] def
  1787.    /Encoding 256 array def
  1788.    0 1 255 {Encoding exch /.notdef put} for
  1789.  
  1790.    /BuildChar
  1791.      { 1  0
  1792.        -0.1 -0.1 1.1 1.1
  1793.        setcachedevice
  1794.        pop begin
  1795.  
  1796.        0 setlinejoin
  1797.  
  1798.        SquareSize 100 div dup scale
  1799.        0 0 moveto
  1800.        1 0 lineto
  1801.        1 1 lineto
  1802.        0 1 lineto
  1803.        closepath
  1804.  
  1805.        Shadow1 100 div
  1806.        1 Shadow2 100 div sub
  1807.        1 index dup moveto
  1808.        1 index 1 index lineto
  1809.        dup dup lineto
  1810.        dup 2 index lineto
  1811.        closepath
  1812.        2{pop}repeat
  1813.        fill
  1814.  
  1815.        end
  1816.      } def
  1817.    end
  1818.  
  1819.    /pntsize 1000 Frequency div def
  1820.  
  1821.    /FillFont newfont definefont pop
  1822.    /FillFont findfont pntsize scalefont setfont
  1823.  
  1824.    eoclip newpath
  1825.  
  1826.    ForegroundGray 100 div 1 exch sub setgray
  1827.  
  1828.    Bblly pntsize Bbury
  1829.      { Bbllx exch moveto
  1830.        { (a) show
  1831.          currentpoint
  1832.          pop Bburx gt
  1833.          {exit} if
  1834.        } loop
  1835.      } for
  1836.    } bind def
  1837.  
  1838. %@Fill
  1839. /Motifs %Motifs,4, Motif=1, Frequency=2, Spacing(%)=100, ForegroundGray=100
  1840.    {
  1841.    /ForegroundGray exch 0 100 InRange def
  1842.    /Spacing exch 1 300 InRange def
  1843.    /Frequency exch 1 25 InRange def
  1844.    /Character exch 1 8 InRange def
  1845.  
  1846.    /str 1 string def
  1847.    str 0 Character put
  1848.  
  1849.    /newfont 10 dict def
  1850.    newfont begin
  1851.  
  1852.    /FontMatrix [.001                0
  1853.                 0                   .001
  1854.                 0                   0] def
  1855.    /FontType 3 def
  1856.    /FontBBox [0 0 500 1000] def
  1857.  
  1858.    /Encoding 256 array def
  1859.    0 1 255 {Encoding exch /.notdef put} for
  1860.    Encoding  1 /CanadianFlag put
  1861.    Encoding  2 /Corels put
  1862.    Encoding  3 /Globe put
  1863.    Encoding  4 /CubeSolid put
  1864.    Encoding  5 /CubeFrame put
  1865.    Encoding  6 /Balls put
  1866.    Encoding  7 /Checkerboard put
  1867.    Encoding  8 /CCCTlogo put
  1868.  
  1869.    /CharProcs 9 dict def
  1870.    CharProcs begin
  1871.    /.notdef {} def
  1872.    /CanadianFlag
  1873.      { 9.6 9.6 scale
  1874.        9 -30 translate
  1875.  
  1876.        -9 60 moveto
  1877.        -9 30 lineto
  1878.        -1 30 lineto
  1879.        -1 60 lineto
  1880.        closepath
  1881.  
  1882.        43 60 moveto
  1883.        43 30 lineto
  1884.        35 30 lineto
  1885.        35 60 lineto
  1886.        closepath
  1887.  
  1888.        17 58 moveto
  1889.        15 54 lineto
  1890.        12 55 lineto
  1891.        14 47 lineto
  1892.        10 51 lineto
  1893.        10 49 lineto
  1894.        05 50 lineto
  1895.        07 45 lineto
  1896.        05 45 lineto
  1897.        12 39 lineto
  1898.        10 37 lineto
  1899.        16.5 38 lineto
  1900.        16.5 32 lineto
  1901.        17.5 32 lineto
  1902.        17.5 38 lineto
  1903.        24 37 lineto
  1904.        22 39 lineto
  1905.        29 45 lineto
  1906.        27 45 lineto
  1907.        29 50 lineto
  1908.        24 49 lineto
  1909.        24 51 lineto
  1910.        20 47 lineto
  1911.        22 55 lineto
  1912.        19 54 lineto
  1913.        closepath
  1914.  
  1915. %       0.3 setlinewidth
  1916. %       stroke
  1917.        fill
  1918.        } def
  1919.    /Corels
  1920.        { 250 250 translate
  1921.        113 113 scale
  1922.  
  1923.        7 { 45 rotate
  1924.          gsave
  1925.          1 2 sqrt div 1 add 0 translate
  1926.          .5 .5 moveto
  1927.          -.5 .5 lineto
  1928.          -.5 -.5 lineto
  1929.          .5 -.5 lineto
  1930.          closepath
  1931.          fill
  1932.          grestore
  1933.          } repeat
  1934.        } def
  1935.    /Globe
  1936.        {
  1937.        250 250 translate
  1938.        250 250 scale
  1939.        0 1 4
  1940.           { matrix currentmatrix exch
  1941.           22.5 mul sin
  1942.           1 scale
  1943.           0 0 1 90 450 arc
  1944.           setmatrix
  1945.           } for
  1946.  
  1947.        -3 1 3
  1948.           { 22.5 mul sin
  1949.           dup
  1950.           dup mul 1 sub neg sqrt
  1951.           dup neg 2 index moveto
  1952.           exch lineto
  1953.           } for
  1954.  
  1955.        .01 setlinewidth
  1956.        stroke
  1957.        } def
  1958.    /CubeSolid
  1959.        {
  1960.        250 250 translate
  1961.        145 145 scale
  1962.        /Rotm
  1963.           { 30 matrix rotate transform
  1964.           exch 3 1 roll
  1965.           30 matrix rotate transform
  1966.           pop exch
  1967.           moveto
  1968.           } bind def
  1969.        /Rotl
  1970.           { 30 matrix rotate transform
  1971.           exch 3 1 roll
  1972.           30 matrix rotate transform
  1973.           pop exch
  1974.           lineto
  1975.           } bind def
  1976.  
  1977.         1  1  1 Rotm
  1978.        -1  1  1 Rotl
  1979.        -1 -1  1 Rotl
  1980.         1 -1  1 Rotl
  1981.        closepath
  1982.  
  1983.        -1  1  1 Rotm
  1984.        -1  1 -1 Rotl
  1985.         1  1 -1 Rotl
  1986.         1 -1 -1 Rotl
  1987.         1 -1  1 Rotl
  1988.  
  1989.         1  1  1 Rotm
  1990.         1  1 -1 Rotl
  1991.  
  1992.        .01 setlinewidth
  1993.        stroke
  1994.        } def
  1995.    /CubeFrame
  1996.        {
  1997.        250 250 translate
  1998.        145 145 scale
  1999.        /Rotm
  2000.           { 30 matrix rotate transform
  2001.           exch 3 1 roll
  2002.           30 matrix rotate transform
  2003.           pop exch
  2004.           moveto
  2005.           } bind def
  2006.        /Rotl
  2007.           { 30 matrix rotate transform
  2008.           exch 3 1 roll
  2009.           30 matrix rotate transform
  2010.           pop exch
  2011.           lineto
  2012.           } bind def
  2013.  
  2014.         1  1  1 Rotm
  2015.        -1  1  1 Rotl
  2016.        -1 -1  1 Rotl
  2017.         1 -1  1 Rotl
  2018.        closepath
  2019.  
  2020.         1  1 -1 Rotm
  2021.        -1  1 -1 Rotl
  2022.        -1 -1 -1 Rotl
  2023.         1 -1 -1 Rotl
  2024.        closepath
  2025.  
  2026.         1  1  1 Rotm
  2027.         1  1 -1 Rotl
  2028.        -1  1  1 Rotm
  2029.        -1  1 -1 Rotl
  2030.        -1 -1  1 Rotm
  2031.        -1 -1 -1 Rotl
  2032.         1 -1  1 Rotm
  2033.         1 -1 -1 Rotl
  2034.  
  2035.        .01 setlinewidth
  2036.        stroke
  2037.        } def
  2038.    /Balls
  2039.        { 250 250 translate
  2040.        225 225 scale
  2041.  
  2042.        0 0 1.1 0 360 arc
  2043.        -0.32  0.55 translate
  2044.        30 rotate
  2045.        1 2 div  1 3 div scale
  2046.        0 0 1.1 360 0 arcn
  2047.        fill
  2048.        } def
  2049.    /Checkerboard
  2050.        { 0 0 moveto
  2051.        500 0 lineto
  2052.        500 500 lineto
  2053.        0 500 lineto
  2054.        closepath
  2055.        fill
  2056.        } def
  2057.    /CCCTlogo
  2058.        {
  2059.        4.8 4.8 scale
  2060.        -21 -26 translate
  2061.  
  2062.        36.4 28.4 moveto
  2063.        70 38 35 196 176.7 arcn
  2064.        35.1 40 35 42 24 41 curveto
  2065.        21 37 24 38 22 32 curveto
  2066.        21 28 25 27 28 28 curveto
  2067.        33 26 32 30 36.4 28.4 curveto
  2068.  
  2069.        36.5 48.2 moveto
  2070.        70 38 35 163.1 144.5 arcn
  2071.        40 59 39 60 36 61 curveto
  2072.        33 63 29 62 27 61 curveto
  2073.        24 58 29 55 26 54 curveto
  2074.        24 53 25 50 25 50 curveto
  2075.        28 47 30 44 36.5 48.2 curveto
  2076.  
  2077.        44.3 61.7 moveto
  2078.        70 38 35 137.3 111.5 arcn
  2079.        56 81 52 75 53 81 curveto
  2080.        52 87 50 81 46 84 curveto
  2081.        37 84 40 80 40 76 curveto
  2082.        42 70 35 73 44.3 61.7 curveto
  2083.  
  2084.        60.8 71.8 moveto
  2085.        70 38 35 105.3 80.0 arcn
  2086.        78 72 78 76 77 80 curveto
  2087.        77 81 80 82 79 83 curveto
  2088.        77 85 74 84 70 85 curveto
  2089.        65 85 69 80 62 80 curveto
  2090.        59 77 61 74 60.8 71.8 curveto
  2091.  
  2092.        97.1 60.1 moveto
  2093.        70 38 35 39.2 66.4 arc
  2094.        81 74 82 78 85 81 curveto
  2095.        91 81 98 84 95 76 curveto
  2096.        98 74 115 77 103 72 curveto
  2097.        101 68 100 61 97.1 60.1 curveto
  2098.  
  2099.        100 56 moveto
  2100.        70 38 35 31 11.6 arcn
  2101.        113 42 114 49 118 50 curveto
  2102.        115 57 123 56 120 60 curveto
  2103.        115 60 116 64 109 63 curveto
  2104.        104 62 107 57 100 56 curveto
  2105.  
  2106.        105 39 moveto
  2107.        70 38 35 1.6 -14.8 arcn
  2108.        107 27 110 28 112 27 curveto
  2109.        115 27 111 31 118 32 curveto
  2110.        120 33 125 33 122 36 curveto
  2111.        121 37 119 38 117 39 curveto
  2112.        113 46 112 39 105 39 curveto
  2113.  
  2114.        fill
  2115.     } def
  2116.    end
  2117.  
  2118.    /BuildChar
  2119.      {Spacing 100 div 500 mul  dup
  2120.       -0.1 -0.1 500.1 1000.1
  2121.       setcachedevice
  2122.       exch begin
  2123.       Encoding exch get
  2124.       CharProcs exch get
  2125.       end
  2126.       exec
  2127.      }def
  2128.    end
  2129.  
  2130.    /pntsize 100000 Frequency div Spacing div def
  2131.  
  2132.    /FillFont newfont definefont pop
  2133.    /FillFont findfont pntsize scalefont setfont
  2134.  
  2135.    /increment Spacing 100 div pntsize mul def
  2136.  
  2137.    eoclip newpath
  2138.    ForegroundGray 100 div 1 exch sub setgray
  2139.    Bblly increment Bbury
  2140.      { Bbllx 1 index moveto
  2141.        { str show
  2142.          currentpoint
  2143.          dup 3 index sub
  2144.          increment 2.1 div gt { increment sub } if
  2145.          1 index Bburx gt
  2146.          {pop pop pop exit} if
  2147.          moveto
  2148.        } loop
  2149.      } for
  2150.    } bind def
  2151.  
  2152. %@Fill
  2153. /Octagons %Octagons,4, Frequency=8, LineWidth=5, ForegroundGray=100, BackgroundGray=0
  2154.    {
  2155.    /BackgroundGray exch -1 100 InRange def
  2156.    /ForegroundGray exch 0 100 InRange def
  2157.    /Linewidth      exch 0 100 InRange def
  2158.    /Frequency      exch 2 100 InRange def
  2159.  
  2160.    /newfont 10 dict def
  2161.    newfont begin
  2162.  
  2163.    /FontMatrix [1 2 sqrt 1 add div  0
  2164.                 0                   1 2 sqrt 1 add div
  2165.                 0                   0] def
  2166.    /FontType 3 def
  2167.    /FontBBox [0 0 2 sqrt 1 add 2 sqrt 1 add] def
  2168.    /Encoding 256 array def
  2169.    0 1 255 {Encoding exch /.notdef put} for
  2170.  
  2171.    /BuildChar
  2172.      { 2 sqrt 1 add  0
  2173.        -0.5 -0.5 2 sqrt 1.5 add 2 sqrt 1.5 add
  2174.        setcachedevice
  2175.        pop begin
  2176.  
  2177.        1 2 sqrt div  0 moveto
  2178.        1 2 sqrt div 1 add  0 lineto
  2179.        2 sqrt 1 add  1 2 sqrt div lineto
  2180.        2 sqrt 1 add  1 2 sqrt div 1 add lineto
  2181.        1 2 sqrt div 1 add  2 sqrt 1 add lineto
  2182.        1 2 sqrt div  2 sqrt 1 add lineto
  2183.        0  1 2 sqrt div 1 add lineto
  2184.        0  1 2 sqrt div lineto
  2185.        closepath
  2186.  
  2187.        Linewidth pntsize div 2 sqrt 1 add mul setlinewidth
  2188.        stroke
  2189.  
  2190.       end
  2191.      } def
  2192.    end
  2193.  
  2194.    /pntsize 1000 Frequency div def
  2195.    /FillFont newfont definefont pop
  2196.    /FillFont findfont pntsize scalefont setfont
  2197.  
  2198.    eoclip
  2199.    BackgroundGray 0 ge
  2200.       { BackgroundGray 100 div 1 exch sub setgray fill }
  2201.       { newpath } ifelse
  2202.  
  2203.    ForegroundGray 100 div 1 exch sub setgray
  2204.  
  2205.    Bblly pntsize Bbury
  2206.      { Bbllx pntsize Bburx
  2207.        { 1 index moveto
  2208.        (a) show
  2209.        } for
  2210.      pop
  2211.      } for
  2212.    } bind def
  2213.  
  2214. %@Fill
  2215. /Patio %Patio,4, Frequency=8, LineWidth=5, ForegroundGray=100, BackgroundGray=0
  2216.    {
  2217.    /BackgroundGray exch -1 100 InRange def
  2218.    /ForegroundGray exch 0 100 InRange def
  2219.    /Linewidth      exch 0 100 InRange def
  2220.    /Frequency      exch 2 100 InRange def
  2221.  
  2222.    /newfont 10 dict def
  2223.    newfont begin
  2224.  
  2225.    /FontMatrix [2 7 div             0
  2226.                 0                   2 7 div
  2227.                 0                   0] def
  2228.    /FontType 3 def
  2229.    /FontBBox [0 0 3 sqrt 2 mul  7 2 div] def
  2230.    /Encoding 256 array def
  2231.    0 1 255 {Encoding exch /.notdef put} for
  2232.  
  2233.    /BuildChar
  2234.      { 3 sqrt 3 mul 2 div  3 2 div
  2235.        -0.5 -0.5 3 sqrt 2 mul 0.5 add 7 2 div 0.5 add
  2236.        setcachedevice
  2237.        pop begin
  2238.  
  2239.        3 sqrt  3 2 div  translate
  2240.        3 sqrt 2 div  1 2 div  moveto
  2241.        3 { 120 rotate
  2242.            3 sqrt 2 div  -3 2 div lineto
  2243.            3 sqrt  -1 lineto
  2244.            3 sqrt  0 lineto
  2245.            3 sqrt 2 div  1 2 div lineto
  2246.          } repeat
  2247.  
  2248.        Linewidth pntsize div 7 2 div mul setlinewidth
  2249.        stroke
  2250.  
  2251.        end
  2252.      } def
  2253.    end
  2254.  
  2255.    /pntsize 1250 Frequency div def
  2256.  
  2257.    /FillFont newfont definefont pop
  2258.    /FillFont findfont pntsize scalefont setfont
  2259.  
  2260.    /Pointsize pntsize 6 mul 7 div def
  2261.  
  2262.    eoclip
  2263.    BackgroundGray 0 ge
  2264.       { BackgroundGray 100 div 1 exch sub setgray fill }
  2265.       { newpath } ifelse
  2266.  
  2267.    ForegroundGray 100 div 1 exch sub setgray
  2268.  
  2269.    Bblly Pointsize Bbury
  2270.      { Bbllx 1 index moveto
  2271.        { (a) show
  2272.          currentpoint
  2273.          dup 3 index sub
  2274.          Pointsize 2 div gt { Pointsize sub } if
  2275.          1 index Bburx gt
  2276.          {pop pop pop exit} if
  2277.          moveto
  2278.        } loop
  2279.      } for
  2280.    } bind def
  2281.  
  2282. %@Fill
  2283. /Rectangles %Rectangles,5, Area=100, Number=50, Linewidth=5, Gray=0, RandomSeed=0
  2284.    {
  2285.    srand
  2286.    /Grey exch 0 100 InRange def
  2287.    /Linewidth exch 0 100 InRange def
  2288.    /Number exch 1 200 InRange def
  2289.    /area exch 10 300 InRange def
  2290.  
  2291.    /dx Bburx Bbllx sub 2 mul def
  2292.    /dy Bbury Bblly sub 2 mul def
  2293.    /Area area 10000 mul def
  2294.  
  2295.    eoclip newpath
  2296.  
  2297.    Linewidth setlinewidth
  2298.    Bbllx dx 2 div sub  Bblly dy 2 div sub  translate
  2299.  
  2300. %   Area log
  2301.    Number {
  2302.       rand dx mod rand dy mod moveto
  2303. %      rand 180 mod 90 sub 100 div dup  dup mul 1 exch sub sqrt
  2304. %      exch atan 180 div 1 index mul 10 exch exp
  2305.       rand Area mod rand Area mod mul sqrt sqrt
  2306.       dup 0 rlineto
  2307.       0 Area 2 index div rlineto
  2308.       dup neg 0 rlineto
  2309.       closepath
  2310.       pop
  2311.  
  2312.       gsave
  2313.       Grey 100 div 1 exch sub setgray
  2314.       fill
  2315.       grestore
  2316.       0 setgray
  2317.       stroke
  2318.       } repeat
  2319.  
  2320.    } bind def
  2321.  
  2322. %@Fill
  2323. /Reptiles %Reptiles,5, Frequency=4, Gray1=60, Gray2=30, Gray3=0, LineWidth=8
  2324. {
  2325.   /LineWidth exch 0 250 InRange def
  2326.   /Gray3 exch 0 100 InRange 100 div def
  2327.   /Gray2 exch -1 100 InRange 100 div def
  2328.   /Gray1 exch -1 100 InRange 100 div def
  2329.   /Frequency exch 1 100 InRange def
  2330.  
  2331.   /newfont 10 dict def
  2332.   newfont begin
  2333.  
  2334.   /FontMatrix [2 7 div             0
  2335.                0                   2 7 div
  2336.                0                   0] def
  2337.   /FontType 3 def
  2338.   /FontBBox [-1.73 -1.86 2.36 2.0] def
  2339.   /Encoding 256 array def
  2340.   0 1 255 {Encoding exch /.notdef put} for
  2341.   Encoding 97 /ReptilesStroked put
  2342.   Encoding 98 /ReptileFilled put
  2343.  
  2344.   /CharProcs 3 dict def
  2345.   CharProcs begin
  2346.   /.notdef {} def
  2347.   /ReptilesStroked
  2348.   {
  2349.     %3 sqrt  3 2 div  translate
  2350.  
  2351.     3 sqrt 2 div  1 2 div  moveto
  2352.     3
  2353.     {
  2354.       120 rotate
  2355.  
  2356.       0     0    moveto
  2357.       0.32 -0.40 lineto
  2358.       0.32 -0.48 lineto
  2359.       0    -0.72 lineto
  2360.  
  2361.       0.05 -1.03 moveto
  2362.       0.4  -0.76 lineto
  2363.       0.84 -0.84 lineto
  2364.       0.5  -0.96 lineto
  2365.       0.31 -1.18 lineto
  2366.  
  2367.       0.87 -1.5  moveto
  2368.       0.58 -1.28 lineto
  2369.       0.8  -1.14 lineto
  2370.       0.94 -1.18 lineto
  2371.       1.24 -1.08 lineto
  2372.       1.42 -1.18 lineto
  2373.  
  2374.       1.68 -1.02 moveto
  2375.       1.52 -0.84 lineto
  2376.       1.64 -0.66 lineto
  2377.       1.73 -0.36 lineto
  2378.  
  2379.       1.73  0    moveto
  2380.       1.41 -0.26 lineto
  2381.       1.32 -0.49 lineto
  2382.       1.06 -0.24 lineto
  2383.       1.42  0.18 lineto
  2384.  
  2385.       0.87  0.57 moveto
  2386.       0.87  0.26 lineto
  2387.       0.99  0.26 lineto
  2388.       1.05  0.12 lineto
  2389.       0.82 -0.07 lineto
  2390.       0.68 -0.07 lineto
  2391.       0.62  0.36 lineto
  2392.  
  2393.  
  2394.       3 sqrt 2 div  1 2 div moveto
  2395.  
  2396.     } repeat
  2397.  
  2398.     LineWidth Pointsize div 7 2 div mul setlinewidth
  2399.     stroke
  2400.  
  2401.   } def
  2402.   /ReptileFilled
  2403.   {
  2404.     0     0    moveto
  2405.     0.32 -0.40 lineto
  2406.     0.32 -0.48 lineto
  2407.     0    -0.72 lineto
  2408.  
  2409.    -0.40 -0.55 lineto
  2410.    -0.47 -0.68 lineto
  2411.    -0.42 -0.97 lineto
  2412.    -0.27 -0.99 lineto
  2413.    -0.21 -0.88 lineto
  2414.  
  2415.     0.05 -1.03 lineto
  2416.     0.4  -0.76 lineto
  2417.     0.84 -0.84 lineto
  2418.     0.5  -0.96 lineto
  2419.     0.31 -1.18 lineto
  2420.  
  2421.     0.32 -1.39 lineto
  2422.     0.55 -1.60 lineto
  2423.     0.59 -1.74 lineto
  2424.     0.82 -1.86 lineto
  2425.  
  2426.     0.87 -1.5  lineto
  2427.     0.58 -1.28 lineto
  2428.     0.8  -1.14 lineto
  2429.     0.94 -1.18 lineto
  2430.     1.24 -1.08 lineto
  2431.     1.42 -1.18 lineto
  2432.     1.52 -1.45 lineto
  2433.     1.45 -1.81 lineto
  2434.     1.74 -1.47 lineto
  2435.     1.68 -1.02 lineto
  2436.     1.52 -0.84 lineto
  2437.     1.64 -0.66 lineto
  2438.     1.73 -0.36 lineto
  2439.     2.28 -0.46 lineto
  2440.     2.36 -0.11 lineto
  2441.     2.12 -0.15 lineto
  2442.     1.73  0    lineto
  2443.     1.41 -0.26 lineto
  2444.     1.32 -0.49 lineto
  2445.     1.06 -0.24 lineto
  2446.     1.42  0.18 lineto
  2447.     1.21  0.41 lineto
  2448.     1.11  0.60 lineto
  2449.  
  2450.     0.87  0.57 lineto
  2451.     0.87  0.26 lineto
  2452.     0.99  0.26 lineto
  2453.     1.05  0.12 lineto
  2454.     0.82 -0.07 lineto
  2455.     0.68 -0.07 lineto
  2456.     0.62  0.36 lineto
  2457.     0.26  0.52 lineto
  2458.     0.19  0.48 lineto
  2459.     closepath
  2460.     fill
  2461.   } def
  2462.   end
  2463.  
  2464.   /BuildChar
  2465.   {
  2466.     3 sqrt 3 mul 2 div  3 2 div
  2467.     -1.83 -1.96 2.46 2.1
  2468.     setcachedevice
  2469.     exch begin
  2470.     Encoding exch get
  2471.     CharProcs exch get
  2472.     end
  2473.     exec
  2474.   } def
  2475.   end
  2476.  
  2477.   /Pointsize 2000 Frequency div def
  2478.  
  2479.   /FillFont newfont definefont pop
  2480.   /FillFont findfont Pointsize scalefont setfont
  2481.  
  2482.   /pntsize Pointsize 6 mul 7 div def
  2483.   /HeightDiff Pointsize 2 mul 7 div .49 mul def
  2484.  
  2485.   eoclip newpath
  2486.  
  2487.   currentscreen
  2488.   3 -1 roll
  2489.   pop 120
  2490.   3 1 roll
  2491.   setscreen
  2492.  
  2493.   Bblly pntsize Bbury pntsize add HeightDiff add
  2494.   {
  2495.     Bbllx 1 index moveto
  2496.     {
  2497.       currentpoint
  2498.       1 index exch
  2499.  
  2500.       2 copy 2 copy translate
  2501.       240 rotate
  2502.       Gray1 0 ge
  2503.       { Gray1 1 exch sub setgray
  2504.         (b) show
  2505.       } if
  2506.       0 0 moveto
  2507.       -240 rotate
  2508.       neg exch neg exch translate
  2509.  
  2510.       2 copy translate
  2511.       120 rotate
  2512.       Gray2 0 ge
  2513.       { Gray2 1 exch sub setgray
  2514.         (b) show
  2515.       } if
  2516.       0 0 moveto
  2517.       -120 rotate
  2518.       neg exch neg exch translate
  2519.  
  2520.       Gray3 1 exch sub setgray
  2521.       (b) show
  2522.  
  2523.       currentpoint
  2524.       dup 4 index sub
  2525.       pntsize 2.1 div gt { pntsize sub } if
  2526.       3 -1 roll Bburx gt
  2527.       {pop pop pop exit} if
  2528.       moveto
  2529.     } loop
  2530.   } for
  2531.  
  2532.   LineWidth 0 gt
  2533.   {
  2534.     0 setgray
  2535.     Bblly pntsize Bbury pntsize add
  2536.     {
  2537.       Bbllx 1 index moveto
  2538.       {
  2539.         (a) show
  2540.         currentpoint
  2541.         dup 3 index sub
  2542.         pntsize 2.1 div gt { pntsize sub } if
  2543.         1 index Bburx gt
  2544.         {pop pop pop exit} if
  2545.         moveto
  2546.       } loop
  2547.     } for
  2548.   } if
  2549. } bind def
  2550.  
  2551. %@Fill
  2552. /SpiderWeb %SpiderWeb,5, LineWidth=5, Separation=300, MaximumAngle=40, MinimumAngle=10, RandomSeed=0
  2553.    { srand
  2554.    /MinAng exch 2 90 InRange def
  2555.    /MaxAng exch MinAng 90 InRange MinAng wDstChck def
  2556.    /Sep exch 10 500 InRange def
  2557.    /Linewidth exch 0 100 InRange def
  2558.  
  2559.    eoclip
  2560.    newpath
  2561.  
  2562.    /dx Bburx Bbllx sub def
  2563.    /dy Bbury Bblly sub def
  2564.    /hyp dx dup mul dy dup mul add sqrt def
  2565.    /DifAng MaxAng MinAng sub def
  2566.  
  2567.    Bbllx Bblly translate
  2568.    dx 2 div dy 2 div translate
  2569.  
  2570.    /theta 0 def
  2571.    /dtheta 0 def
  2572.  
  2573.    {  0 0 moveto
  2574.  
  2575.       /theta theta dtheta add def
  2576.       theta 360 ge
  2577.         { exit } if
  2578.       /dtheta rand DifAng mod MinAng add def
  2579.       theta dtheta add 350 gt
  2580.         { /dtheta 360 theta sub def } if
  2581.  
  2582.       hyp theta cos mul hyp theta sin mul lineto
  2583.  
  2584.       0 Sep hyp
  2585.          {
  2586.          dup theta cos mul
  2587.          1 index theta sin mul
  2588.          moveto
  2589.  
  2590.          dup theta dtheta add cos theta cos add mul
  2591.          1 index theta dtheta add sin theta sin add mul
  2592.          2 index
  2593.          theta 180 add dtheta add
  2594.          theta 180 add
  2595.          arcn
  2596.  
  2597.          pop
  2598.          } for
  2599.       Linewidth setlinewidth
  2600.       stroke
  2601.       } loop
  2602.    } bind def
  2603.  
  2604. %@Fill
  2605. /Spirals %Spirals,4, Size=150, LineWidth=5, ForegroundGray=100, BackgroundGray=0
  2606.    {
  2607.    /BackgroundGrey exch -1 100 InRange def
  2608.    /ForegroundGray exch 0 100 InRange def
  2609.    /Linewidth exch 0 100 InRange def
  2610.    /Size exch 10 500 InRange def
  2611.  
  2612.    eoclip
  2613.    BackgroundGrey 0 ge
  2614.       { BackgroundGrey 100 div 1 exch sub setgray fill }
  2615.       { newpath } ifelse
  2616.  
  2617.    /cx Bburx Bbllx add 2 div def
  2618.    /cy Bbury Bblly add 2 div def
  2619.    /pntsize2 Size 2 div def
  2620.    /cy2 cy pntsize2 add def
  2621.    /hyp Bburx Bbllx sub dup mul
  2622.         Bbury Bblly sub dup mul
  2623.         add sqrt 2 div def
  2624.  
  2625.    ForegroundGray 100 div 1 exch sub setgray
  2626.  
  2627.    Linewidth setlinewidth
  2628.    0 Size hyp
  2629.       { cx cy 2 index 90 270 arc
  2630.         cx cy2 2 index pntsize2 add -90 90 arc
  2631.         pop
  2632.       } for
  2633.    stroke
  2634.    } bind def
  2635.  
  2636. %@Fill
  2637. /Spokes %Spokes,5, Number=120, LineWidth=5, Horizontal=0, Vertical=0, ForegroundGray=100
  2638.         { %def -- Fill function that fills with spokes
  2639.         /ForegroundGray exch 0 100 InRange def
  2640.     /wY exch 0 100 InRange def
  2641.     /wX exch 0 100 InRange def
  2642.     /LineWidth exch 0 100 InRange def
  2643.     /Number exch 4 360 InRange def
  2644.  
  2645.         eoclip
  2646.         newpath
  2647.         /Flen Bburx Bbllx sub dup mul Bbury Bblly sub dup mul add sqrt def
  2648.         Bbllx Bblly translate
  2649.     Bburx Bbllx sub wX mul 100 div  Bbury Bblly sub wY mul 100 div translate
  2650.  
  2651.     360 Number div
  2652.         Number {
  2653.            0 0 moveto
  2654.            Flen 0 lineto
  2655.            dup rotate
  2656.            } repeat
  2657.         pop
  2658.         ForegroundGray 100 div 1 exch sub setgray
  2659.     LineWidth setlinewidth
  2660.     stroke
  2661.         } bind def
  2662.  
  2663. %@Fill
  2664. /Squares %Squares,4, Frequency=8, LineWidth=5, ForegroundGray=100, BackgroundGray=0
  2665.    {
  2666.    /BackgroundGray exch -1 100 InRange def
  2667.    /ForegroundGray exch 0 100 InRange def
  2668.    /Linewidth      exch 0 100 InRange def
  2669.    /Frequency      exch 2 100 InRange def
  2670.  
  2671.    /newfont 10 dict def
  2672.    newfont begin
  2673.  
  2674.    /FontMatrix [1  0  0
  2675.                 1  0  0] def
  2676.    /FontType 3 def
  2677.    /FontBBox [0 0 1 1] def
  2678.    /Encoding 256 array def
  2679.    0 1 255 {Encoding exch /.notdef put} for
  2680.  
  2681.    /BuildChar
  2682.      { 1  0
  2683.        -0.1 -0.1 1.1 1.1
  2684.        setcachedevice
  2685.        pop begin
  2686.  
  2687.        0 0 moveto
  2688.        0 1 lineto
  2689.        1 1 lineto
  2690.        1 0 lineto
  2691.  
  2692.        Linewidth pntsize div setlinewidth
  2693.        stroke
  2694.  
  2695.       end
  2696.      } def
  2697.    end
  2698.  
  2699.    /pntsize 1000 Frequency div def
  2700.  
  2701.    /FillFont newfont definefont pop
  2702.    /FillFont findfont pntsize scalefont setfont
  2703.  
  2704.    eoclip
  2705.    BackgroundGray 0 ge
  2706.       { BackgroundGray 100 div 1 exch sub setgray fill }
  2707.       { newpath } ifelse
  2708.  
  2709.    ForegroundGray 100 div 1 exch sub setgray
  2710.  
  2711.    Bblly pntsize Bbury
  2712.      { Bbllx exch moveto
  2713.        { (a) show
  2714.          currentpoint
  2715.          pop Bburx gt
  2716.          {exit} if
  2717.        } loop
  2718.      } for
  2719.    } bind def
  2720.  
  2721. %@Fill
  2722. /StarOfDavid %StarOfDavid,4, Frequency=8, LineWidth=5, ForegroundGray=100, BackgroundGray=0
  2723.    {
  2724.    /BackgroundGray exch -1 100 InRange def
  2725.    /ForegroundGray exch 0 100 InRange def
  2726.    /Linewidth      exch 0 100 InRange def
  2727.    /Frequency      exch 2 100 InRange def
  2728.  
  2729.    /newfont 10 dict def
  2730.    newfont begin
  2731.  
  2732.    /FontMatrix [1 3 sqrt 2 mul div  0
  2733.                 0                   1 3 sqrt 2 mul div
  2734.                 0                   0] def
  2735.    /FontType 3 def
  2736.    /FontBBox [0 0 2 3 sqrt 2 mul] def
  2737.    /Encoding 256 array def
  2738.    0 1 255 {Encoding exch /.notdef put} for
  2739.  
  2740.    /BuildChar
  2741.      { 1  3 sqrt
  2742.        -0.1 -0.1 2.1 3 sqrt 2 mul 0.1 add
  2743.        setcachedevice
  2744.        pop begin
  2745.  
  2746.        1 2 div  0 moveto
  2747.        3 2 div  0 lineto
  2748.        2  3 sqrt 2 div lineto
  2749.        3 2 div  3 sqrt lineto
  2750.        1 2 div  3 sqrt lineto
  2751.        0  3 sqrt 2 div lineto
  2752.        closepath
  2753.  
  2754.        Linewidth pntsize div 3 sqrt 2 mul mul setlinewidth
  2755.        stroke
  2756.  
  2757.       end
  2758.      } def
  2759.    end
  2760.  
  2761.    /pntsize 1732 Frequency div def
  2762.  
  2763.    /FillFont newfont definefont pop
  2764.    /FillFont findfont pntsize scalefont setfont
  2765.  
  2766.    eoclip
  2767.    BackgroundGray 0 ge
  2768.       { BackgroundGray 100 div 1 exch sub setgray fill }
  2769.       { newpath } ifelse
  2770.  
  2771.    ForegroundGray 100 div 1 exch sub setgray
  2772.  
  2773.    Bblly pntsize Bbury
  2774.      { Bbllx pntsize sub 1 index moveto
  2775.        { (a) show
  2776.          currentpoint
  2777.          dup 3 index sub
  2778.          pntsize 2.1 div gt { pntsize sub } if
  2779.          1 index Bburx gt
  2780.          {pop pop pop exit} if
  2781.          moveto
  2782.        } loop
  2783.      } for
  2784.    } bind def
  2785.  
  2786. %@Fill
  2787. /Stars %Stars,4, Number=100, MaximumSize=300, MinimumSize=3, RandomSeed=0
  2788.    { srand
  2789.    /MinSize exch 1 1000 InRange def
  2790.    /MaxSize exch MinSize 1000 InRange def
  2791.    /Number exch 1 2000 InRange def
  2792.  
  2793.    /newfont 10 dict def
  2794.    newfont begin
  2795.  
  2796.    /FontMatrix [1  0  0
  2797.                 1  0  0] def
  2798.    /FontType 3 def
  2799.    /FontBBox [0 0 1 1] def
  2800.    /Encoding 256 array def
  2801.    0 1 255 {Encoding exch /.notdef put} for
  2802.  
  2803.    /BuildChar
  2804.      { 1  0
  2805.        -0.1 -0.1 1.1 1.1
  2806.        setcachedevice
  2807.        pop begin
  2808.  
  2809.        1 .5 moveto
  2810.        .5 .5 .5 0 360 arc
  2811.        fill
  2812.  
  2813.        end
  2814.      } def
  2815.    end
  2816.  
  2817.    /FillFont newfont definefont pop
  2818.    /FillFont findfont 2 scalefont setfont
  2819.  
  2820.    /dx Bburx Bbllx sub def
  2821.    /dy Bbury Bblly sub def
  2822.  
  2823.    eoclip
  2824.    0 setgray
  2825.    fill
  2826.  
  2827.    1 setgray
  2828.    /mtx matrix currentmatrix def
  2829.    dx dy mul Number mul 100000 div cvi
  2830.       { rand dx mod Bbllx add
  2831.       rand dy mod Bblly add
  2832.       moveto
  2833.       MaxSize rand  MaxSize MinSize div cvi  mod 1 add div 10 div
  2834.       dup scale
  2835.       (a) show
  2836.       mtx setmatrix
  2837.       } repeat
  2838.  
  2839.    } bind def
  2840.  
  2841. %@Fill
  2842. /StarShapes %StarShapes,5, Points=5, Frequency=2, Spacing=100, Angle=36, Gray=100
  2843.    {
  2844.    /Grey exch 0 100 InRange def
  2845.    /Theta exch 1 90 InRange def
  2846.    /Spacing exch 1 300 InRange def
  2847.    /Frequency exch 1 25 InRange def
  2848.    /Points exch 1 15 InRange def
  2849.  
  2850.    /str 1 string def
  2851.    str 0 Points put
  2852.  
  2853.    /newfont 10 dict def
  2854.    newfont begin
  2855.  
  2856.    /FontMatrix [.001                0
  2857.                 0                   .001
  2858.                 0                   0] def
  2859.    /FontType 3 def
  2860.    /FontBBox [0 0 500 1000] def
  2861.  
  2862.    /Encoding 256 array def
  2863.    0 1 255 {Encoding exch /.notdef put} for
  2864.  
  2865.    /BuildChar
  2866.      {Spacing 100 div 500 mul  dup
  2867.       -0.1 -0.1 500.1 1000.1
  2868.       setcachedevice
  2869.       exch begin
  2870.  
  2871.       250 250 translate
  2872.       250 250 scale
  2873.       90 rotate
  2874.  
  2875.       dup
  2876.       180 exch div dup sin exch cos div
  2877.       Theta 2 div dup sin exch cos div
  2878.  
  2879.       1 0 moveto
  2880.       2 index
  2881.          {
  2882.          360 3 index div rotate
  2883.          dup dup 3 index add div
  2884.          dup 3 index mul neg
  2885.          lineto
  2886.          1 0 lineto
  2887.          } repeat
  2888.       closepath
  2889.  
  2890.       fill
  2891.       pop pop pop
  2892.  
  2893.       end
  2894.      }def
  2895.    end
  2896.  
  2897.    /pntsize 100000 Frequency div Spacing div def
  2898.  
  2899.    /FillFont newfont definefont pop
  2900.    /FillFont findfont pntsize scalefont setfont
  2901.  
  2902.    /increment Spacing 100 div pntsize mul def
  2903.  
  2904.    eoclip newpath
  2905.  
  2906.    Grey 100 div 1 exch sub setgray
  2907.    Bblly increment Bbury
  2908.      { Bbllx 1 index moveto
  2909.        { str show
  2910.          currentpoint
  2911.          dup 3 index sub
  2912.          increment 2.1 div gt { increment sub } if
  2913.          1 index Bburx gt
  2914.          {pop pop pop exit} if
  2915.          moveto
  2916.        } loop
  2917.      } for
  2918.    } bind def
  2919.  
  2920. %@Fill
  2921. /StoneWall %StoneWall,4, Frequency=15, MaximumGray=100, MinimumGray=0, LineWidth=5
  2922.    {
  2923.    /Linewidth exch 0 100 InRange def
  2924.    /MinGrey exch 0 100 InRange def
  2925.    /MaxGrey exch MinGrey 100 InRange def
  2926.    /Frequency exch 1 50 InRange def
  2927.  
  2928.    /DifGrey MaxGrey MinGrey sub def
  2929.    DifGrey 0 eq
  2930.       { /DifGrey 1 def
  2931.       } if
  2932.    Linewidth Frequency mul 250 div setlinewidth
  2933.    eoclip newpath
  2934.    0 srand
  2935.  
  2936.    currentscreen
  2937.    3 -1 roll
  2938.    pop 100
  2939.    3 1 roll
  2940.    setscreen
  2941.  
  2942.    /dy Bbury Bblly sub def
  2943.    /dx Bburx Bbllx sub def
  2944.    Bbllx Bbury translate
  2945.    250 Frequency div dup scale
  2946.  
  2947.    dy 920 div Frequency mul cvi {
  2948.       0 0 moveto
  2949.       /x0 0 def
  2950.       /y0 0 def
  2951.       /x1 0 def
  2952.       /y1 0 def
  2953.       /x2 0 def
  2954.       /y2 0 def
  2955.       /x3 0 def
  2956.       /y3 0 def
  2957.       0 5 dx 200 div Frequency mul
  2958.          { rand 50 mod 25 div 1 sub add
  2959.          x3 y3 moveto
  2960.          x2 y2 x1 y1 x0 y0 curveto
  2961.          dup rand 30 mod 15 div neg 2 sub
  2962.          2 copy
  2963.          /y0 exch def
  2964.          /x0 exch def
  2965.          lineto
  2966.          dup rand 50 mod 10 div 2.5 sub add rand 50 mod 10 div neg
  2967.          1 index rand 50 mod 10 div
  2968.          4 index rand 30 mod 15 div 2 add
  2969.          6 copy
  2970.          /y3 exch def
  2971.          /x3 exch def
  2972.          /y2 exch def
  2973.          /x2 exch def
  2974.          /y1 exch def
  2975.          /x1 exch def
  2976.          curveto
  2977.          pop
  2978.          closepath
  2979.          gsave
  2980.          rand DifGrey mod MinGrey add 100 div 1 exch sub setgray fill
  2981.          grestore
  2982.          0 setgray stroke
  2983.          } for
  2984.       0 -4 translate
  2985.       } repeat
  2986.    } bind def
  2987.  
  2988. %@Fill
  2989. /Text %Text,5, Font=1, Character=67, Frequency=4, Spacing=100, BackgroundGray=0
  2990.    {
  2991.    /BackGrey exch -1 100 InRange def
  2992.    /Spacing exch 30 300 InRange def
  2993.    /Frequency exch 1 50 InRange def
  2994.    /Character exch 33 255 InRange def
  2995.    /Font exch 1 35 InRange def
  2996.  
  2997.    /pntsize 100000 Frequency div Spacing div def
  2998.    Font  1 eq { /Times-Roman } if
  2999.    Font  2 eq { /Times-Italic } if
  3000.    Font  3 eq { /Times-Bold } if
  3001.    Font  4 eq { /Times-BoldItalic } if
  3002.    Font  5 eq { /Helvetica } if
  3003.    Font  6 eq { /Helvetica-Oblique } if
  3004.    Font  7 eq { /Helvetica-Bold } if
  3005.    Font  8 eq { /Helvetica-BoldOblique } if
  3006.    Font  9 eq { /Courier } if
  3007.    Font 10 eq { /Courier-Oblique } if
  3008.    Font 11 eq { /Courier-Bold } if
  3009.    Font 12 eq { /Courier-BoldOblique } if
  3010.    Font 13 eq { /Symbol } if
  3011.    Font 14 eq { /AvantGarde-Book } if
  3012.    Font 15 eq { /AvantGarde-BookOblique } if
  3013.    Font 16 eq { /AvantGarde-Demi } if
  3014.    Font 17 eq { /AvantGarde-DemiOblique } if
  3015.    Font 18 eq { /Bookman-Demi } if
  3016.    Font 19 eq { /Bookman-DemiItalic } if
  3017.    Font 20 eq { /Bookman-Light } if
  3018.    Font 21 eq { /Bookman-LightItalic } if
  3019.    Font 22 eq { /Helvetica-Narrow } if
  3020.    Font 23 eq { /Helvetica-Narrow-Bold } if
  3021.    Font 24 eq { /Helvetica-Narrow-BoldOblique } if
  3022.    Font 25 eq { /Helvetica-Narrow-Oblique } if
  3023.    Font 26 eq { /NewCenturySchlbk-Roman } if
  3024.    Font 27 eq { /NewCenturySchlbk-Bold } if
  3025.    Font 28 eq { /NewCenturySchlbk-Italic } if
  3026.    Font 29 eq { /NewCenturySchlbk-BoldItalic } if
  3027.    Font 30 eq { /Palatino-Roman } if
  3028.    Font 31 eq { /Palatino-Bold } if
  3029.    Font 32 eq { /Palatino-Italic } if
  3030.    Font 33 eq { /Palatino-BoldItalic } if
  3031.    Font 34 eq { /ZapfChancery-MediumItalic } if
  3032.    Font 35 eq { /ZapfDingbats } if
  3033.    findfont pntsize scalefont setfont
  3034.  
  3035.    /str 1 string def
  3036.    str 0 Character put
  3037.  
  3038.    /increment Spacing 100 div pntsize mul 2 mul def
  3039.  
  3040.    eoclip
  3041.    BackGrey 0 ge
  3042.       { BackGrey 100 div 1 exch sub setgray fill }
  3043.       { newpath } ifelse
  3044.  
  3045.    /Bbury Bbury pntsize add def
  3046.  
  3047.    0 setgray
  3048.    Bblly increment Bbury
  3049.      { Bbllx 1 index moveto
  3050.        { str show
  3051.          currentpoint increment 2 div add
  3052.          dup 3 index sub
  3053.          increment 2.1 div gt { increment sub } if
  3054.          1 index Bburx gt
  3055.          {pop pop pop exit} if
  3056.          moveto
  3057.        } loop
  3058.      } for
  3059.    } bind def
  3060.  
  3061. %@Fill
  3062. /Tiles %Tiles,4, Frequency=8, LineWidth=5, ForegroundGray=100, BackgroundGray=0
  3063.    {
  3064.    /BackgroundGray exch -1 100 InRange def
  3065.    /ForegroundGray exch 0 100 InRange def
  3066.    /Linewidth      exch 0 100 InRange def
  3067.    /Frequency      exch 2 100 InRange def
  3068.  
  3069.    /newfont 10 dict def
  3070.    newfont begin
  3071.  
  3072.    /FontMatrix [1  0  0
  3073.                 1  0  0] def
  3074.    /FontType 3 def
  3075.    /FontBBox [0 0 2 1] def
  3076.    /Encoding 256 array def
  3077.    0 1 255 {Encoding exch /.notdef put} for
  3078.  
  3079.    /BuildChar
  3080.      { 2  .5
  3081.        -0.1 -0.1 2.1 1.1
  3082.        setcachedevice
  3083.        pop begin
  3084.  
  3085.        0   0 moveto
  3086.        1.5 0 lineto
  3087.        1.75  0 .25 180 90 arcn
  3088.        1.75 .5 .25 -90 90 arc
  3089.        1.75  1 .25 270 180 arcn
  3090.        0   1 lineto
  3091.  
  3092.        Linewidth pntsize div setlinewidth
  3093.        stroke
  3094.  
  3095.        end
  3096.      } def
  3097.    end
  3098.  
  3099.    /pntsize 500 Frequency div def
  3100.  
  3101.    /FillFont newfont definefont pop
  3102.    /FillFont findfont pntsize scalefont setfont
  3103.  
  3104.    eoclip
  3105.    BackgroundGray 0 ge
  3106.       { BackgroundGray 100 div 1 exch sub setgray fill }
  3107.       { newpath } ifelse
  3108.  
  3109.    ForegroundGray 100 div 1 exch sub setgray
  3110.  
  3111.    Bblly pntsize Bbury
  3112.      { Bbllx 1 index moveto
  3113.        { (a) show
  3114.          currentpoint
  3115.          dup 3 index sub
  3116.          pntsize 2.1 div gt { pntsize sub } if
  3117.          1 index Bburx gt
  3118.          {pop pop pop exit} if
  3119.          moveto
  3120.        } loop
  3121.      } for
  3122.    } bind def
  3123.  
  3124. %@Fill
  3125. /TreeRings %TreeRings,5, MaxDistance=150, MinDistance=0, LineWidth=5, BackgroundGray=0, RandomSeed=0
  3126.    { srand
  3127.    /BackGrey exch -1 100 InRange def
  3128.    /LineWidth exch 0 100 InRange def
  3129.    /MinDist exch 0 500 InRange def
  3130.    /MaxDist exch MinDist 500 InRange MinDist wDstChck def
  3131.  
  3132.    eoclip
  3133.    BackGrey 0 ge
  3134.       { BackGrey 100 div 1 exch sub setgray fill }
  3135.       { newpath } ifelse
  3136.  
  3137.    /cx Bburx Bbllx add 2 div def
  3138.    /cy Bbury Bblly add 2 div def
  3139.    /pntsize MaxDist MinDist sub def
  3140.    /hyp Bburx Bbllx sub dup mul Bbury Bblly sub dup mul add sqrt def
  3141.  
  3142.    /wr 0 def
  3143.    0 setgray
  3144.    LineWidth setlinewidth
  3145.  
  3146.       {
  3147.       /wr rand pntsize mod MinDist add wr add def
  3148.       cx wr add  cy moveto
  3149.       cx cy wr 0 360 arc
  3150.       stroke
  3151.       wr hyp gt {exit} if
  3152.       } loop
  3153.    } bind def
  3154.  
  3155. %@Fill
  3156. /Triangle %Triangle,4, Frequency=8, LineWidth=5, ForegroundGray=100, BackgroundGray=0
  3157.    {
  3158.    /BackgroundGray exch -1 100 InRange def
  3159.    /ForegroundGray exch 0 100 InRange def
  3160.    /Linewidth      exch 0 100 InRange def
  3161.    /Frequency      exch 2 100 InRange def
  3162.  
  3163.    /newfont 10 dict def
  3164.    newfont begin
  3165.  
  3166.    /FontMatrix  [ 1 3 sqrt div  0
  3167.                   0             1 3 sqrt div
  3168.                   0             0] def
  3169.    /FontType 3 def
  3170.    /FontBBox [0 0 1 3 sqrt] def
  3171.    /Encoding 256 array def
  3172.    0 1 255 {Encoding exch /.notdef put} for
  3173.  
  3174.    /BuildChar
  3175.      { 1  0
  3176.        -0.1 -0.1 1.1 3 sqrt 0.1 add
  3177.        setcachedevice
  3178.        pop begin
  3179.  
  3180.        0 0 moveto
  3181.        1 3 sqrt lineto
  3182.        0 3 sqrt lineto
  3183.        1 0 lineto
  3184.        closepath
  3185.  
  3186.        0 3 sqrt 2 div moveto
  3187.        1 3 sqrt 2 div lineto
  3188.  
  3189.        Linewidth pntsize div 3 sqrt mul setlinewidth
  3190.        stroke
  3191.  
  3192.       end
  3193.      } def
  3194.    end
  3195.  
  3196.    /pntsize 1732 Frequency div def
  3197.    /FillFont newfont definefont pop
  3198.    /FillFont findfont pntsize scalefont setfont
  3199.  
  3200.    eoclip
  3201.    BackgroundGray 0 ge
  3202.       { BackgroundGray 100 div 1 exch sub setgray fill }
  3203.       { newpath } ifelse
  3204.  
  3205.    ForegroundGray 100 div 1 exch sub setgray
  3206.  
  3207.    Bblly pntsize Bbury
  3208.      { Bbllx pntsize sub pntsize 3 sqrt div Bburx
  3209.        { 1 index moveto
  3210.        (a) show
  3211.        } for
  3212.      pop
  3213.      } for
  3214.    } bind def
  3215.  
  3216. %@Fill
  3217. /Waves %Waves,5, Frequency=6, LineWidth=5, ForegroundGray=100, BackgroundGray=0, Spacing(%)=100
  3218.    {
  3219.    /Spacing        exch 30 300 InRange def
  3220.    /BackgroundGray exch -1 100 InRange def
  3221.    /ForegroundGray exch 0 100 InRange def
  3222.    /Linewidth      exch  0 100 InRange def
  3223.    /Frequency      exch  2 100 InRange def
  3224.  
  3225.    /newfont 10 dict def
  3226.    newfont begin
  3227.  
  3228.    /FontMatrix [1 84 div   0
  3229.                 0          1 84 div
  3230.                 0          0] def
  3231.    /FontType 3 def
  3232.    /FontBBox [37 56 111 114] def
  3233.    /Encoding 256 array def
  3234.    0 1 255 {Encoding exch /.notdef put} for
  3235.  
  3236.    /BuildChar
  3237.      { 74  0
  3238.        36.9 55.9 111.1 114.1
  3239.        setcachedevice
  3240.        pop begin
  3241.  
  3242.        1 1.5 scale
  3243.  
  3244.        37 38 moveto
  3245.        76 38 79 73 111 57 curveto
  3246.        80 60 80 38 111 38 curveto
  3247.  
  3248.        Linewidth pntsize div 84 mul setlinewidth
  3249.        stroke
  3250.  
  3251.       end
  3252.      } def
  3253.    end
  3254.  
  3255.    /pntsize 783 Frequency div def
  3256.  
  3257.    /FillFont newfont definefont pop
  3258.    /FillFont findfont pntsize scalefont setfont
  3259.  
  3260.    /Height pntsize Spacing 100 div mul def
  3261.  
  3262.    /Bbllx Bbllx Height sub def
  3263.    /Bblly Bblly Height sub def
  3264.    /Bburx Bburx Height add def
  3265.    /Bbury Bbury Height add def
  3266.  
  3267.    eoclip
  3268.    BackgroundGray 0 ge
  3269.       { BackgroundGray 100 div 1 exch sub setgray fill }
  3270.       { newpath } ifelse
  3271.  
  3272.    ForegroundGray 100 div 1 exch sub setgray
  3273.    Bblly Height Bbury
  3274.      { Bbllx exch moveto
  3275.        { (a) show
  3276.          currentpoint
  3277.          pop Bburx gt
  3278.          {exit} if
  3279.        } loop
  3280.      } for
  3281.    } bind def
  3282.  
  3283. 
  3284.