home *** CD-ROM | disk | FTP | other *** search
/ Corel Draw 7 / CD7_CAD.ISO / custom / userproc.ps < prev    next >
Text File  |  1995-08-18  |  97KB  |  4,063 lines

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