home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1997 October / DPCB1097.iso / Graphics / Draw7 / CUSTOM / USERPROC.PS < prev   
Text File  |  1996-09-17  |  97KB  |  4,065 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 %InvertedElliptical
  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.    /ury Bbury increment add def
  2188.  
  2189.    eoclip newpath
  2190.    ForegroundGray 100 div 1 exch sub setgray
  2191.    Bblly increment ury
  2192.      { Bbllx 1 index moveto
  2193.        { str show
  2194.          currentpoint
  2195.          dup 3 index sub
  2196.          increment 2.1 div gt { increment sub } if
  2197.          1 index Bburx gt
  2198.          {pop pop pop exit} if
  2199.          moveto
  2200.        } loop
  2201.      } for
  2202.    } bind def
  2203.  
  2204. %@Fill
  2205. /Octagons %Octagons,4, Frequency:=8, Lineáwidth:=5, Foregroundágray:=100, Backgroundágray:=0
  2206.    {
  2207.    /BackgroundGray exch -1 100 InRange def
  2208.    /ForegroundGray exch 0 100 InRange def
  2209.    /Linewidth      exch 0 100 InRange def
  2210.    /Frequency      exch 2 100 InRange def
  2211.  
  2212.    /newfont 10 dict def
  2213.    newfont begin
  2214.  
  2215.    /FontMatrix [1 2 sqrt 1 add div  0
  2216.                 0                   1 2 sqrt 1 add div
  2217.                 0                   0] def
  2218.    /FontType 3 def
  2219.    /FontBBox [0 0 2 sqrt 1 add 2 sqrt 1 add] def
  2220.    /Encoding 256 array def
  2221.    0 1 255 {Encoding exch /.notdef put} for
  2222.  
  2223.    /BuildChar
  2224.      { 2 sqrt 1 add  0
  2225.        -0.5 -0.5 2 sqrt 1.5 add 2 sqrt 1.5 add
  2226.        setcachedevice
  2227.        pop begin
  2228.  
  2229.        1 2 sqrt div  0 moveto
  2230.        1 2 sqrt div 1 add  0 lineto
  2231.        2 sqrt 1 add  1 2 sqrt div lineto
  2232.        2 sqrt 1 add  1 2 sqrt div 1 add lineto
  2233.        1 2 sqrt div 1 add  2 sqrt 1 add lineto
  2234.        1 2 sqrt div  2 sqrt 1 add lineto
  2235.        0  1 2 sqrt div 1 add lineto
  2236.        0  1 2 sqrt div lineto
  2237.        closepath
  2238.  
  2239.        Linewidth pntsize div 2 sqrt 1 add mul setlinewidth
  2240.        stroke
  2241.  
  2242.       end
  2243.      } def
  2244.    end
  2245.  
  2246.    /pntsize 1000 Frequency div def
  2247.    /FillFont newfont definefont pop
  2248.    /FillFont findfont pntsize scalefont setfont
  2249.  
  2250.    eoclip
  2251.    BackgroundGray 0 ge
  2252.       { BackgroundGray 100 div 1 exch sub setgray fill }
  2253.       { newpath } ifelse
  2254.  
  2255.    ForegroundGray 100 div 1 exch sub setgray
  2256.  
  2257.    Bblly pntsize Bbury
  2258.      { Bbllx pntsize Bburx
  2259.        { 1 index moveto
  2260.        (a) show
  2261.        } for
  2262.      pop
  2263.      } for
  2264.    } bind def
  2265.  
  2266. %@Fill
  2267. /Patio %Patio,4, Frequency:=8, Lineáwidth:=5, Foregroundágray:=100, Backgroundágray:=0
  2268.    {
  2269.    /BackgroundGray exch -1 100 InRange def
  2270.    /ForegroundGray exch 0 100 InRange def
  2271.    /Linewidth      exch 0 100 InRange def
  2272.    /Frequency      exch 2 100 InRange def
  2273.  
  2274.    /newfont 10 dict def
  2275.    newfont begin
  2276.  
  2277.    /FontMatrix [2 7 div             0
  2278.                 0                   2 7 div
  2279.                 0                   0] def
  2280.    /FontType 3 def
  2281.    /FontBBox [0 0 3 sqrt 2 mul  7 2 div] def
  2282.    /Encoding 256 array def
  2283.    0 1 255 {Encoding exch /.notdef put} for
  2284.  
  2285.    /BuildChar
  2286.      { 3 sqrt 3 mul 2 div  3 2 div
  2287.        -0.5 -0.5 3 sqrt 2 mul 0.5 add 7 2 div 0.5 add
  2288.        setcachedevice
  2289.        pop begin
  2290.  
  2291.        3 sqrt  3 2 div  translate
  2292.        3 sqrt 2 div  1 2 div  moveto
  2293.        3 { 120 rotate
  2294.            3 sqrt 2 div  -3 2 div lineto
  2295.            3 sqrt  -1 lineto
  2296.            3 sqrt  0 lineto
  2297.            3 sqrt 2 div  1 2 div lineto
  2298.          } repeat
  2299.  
  2300.        Linewidth pntsize div 7 2 div mul setlinewidth
  2301.        stroke
  2302.  
  2303.        end
  2304.      } def
  2305.    end
  2306.  
  2307.    /pntsize 1250 Frequency div def
  2308.  
  2309.    /FillFont newfont definefont pop
  2310.    /FillFont findfont pntsize scalefont setfont
  2311.  
  2312.    /Pointsize pntsize 6 mul 7 div def
  2313.  
  2314.    eoclip
  2315.    BackgroundGray 0 ge
  2316.       { BackgroundGray 100 div 1 exch sub setgray fill }
  2317.       { newpath } ifelse
  2318.  
  2319.    ForegroundGray 100 div 1 exch sub setgray
  2320.  
  2321.    Bblly Pointsize Bbury
  2322.      { Bbllx 1 index moveto
  2323.        { (a) show
  2324.          currentpoint
  2325.          dup 3 index sub
  2326.          Pointsize 2 div gt { Pointsize sub } if
  2327.          1 index Bburx gt
  2328.          {pop pop pop exit} if
  2329.          moveto
  2330.        } loop
  2331.      } for
  2332.    } bind def
  2333.  
  2334. %@Fill
  2335. /Rectangles %Rectangles,5, Area:=100, Number:=50, Lineáwidth:=5, Gray:=0, Randomáseed:=0
  2336.    {
  2337.    srand
  2338.    /Grey exch 0 100 InRange def
  2339.    /Linewidth exch 0 100 InRange def
  2340.    /Number exch 1 200 InRange def
  2341.    /area exch 10 300 InRange def
  2342.  
  2343.    /dx Bburx Bbllx sub 2 mul def
  2344.    /dy Bbury Bblly sub 2 mul def
  2345.    /Area area 10000 mul def
  2346.  
  2347.    eoclip newpath
  2348.  
  2349.    Linewidth setlinewidth
  2350.    Bbllx dx 2 div sub  Bblly dy 2 div sub  translate
  2351.  
  2352. %   Area log
  2353.    Number {
  2354.       rand dx mod rand dy mod moveto
  2355. %      rand 180 mod 90 sub 100 div dup  dup mul 1 exch sub sqrt
  2356. %      exch atan 180 div 1 index mul 10 exch exp
  2357.       rand Area mod rand Area mod mul sqrt sqrt
  2358.       dup 0 rlineto
  2359.       0 Area 2 index div rlineto
  2360.       dup neg 0 rlineto
  2361.       closepath
  2362.       pop
  2363.  
  2364.       gsave
  2365.       Grey 100 div 1 exch sub setgray
  2366.       fill
  2367.       grestore
  2368.       0 setgray
  2369.       stroke
  2370.       } repeat
  2371.  
  2372.    } bind def
  2373.  
  2374. %@Fill
  2375. /Reptiles %Reptiles,5, Frequency:=4, Grayá1:=60, Grayá2:=30, Grayá3:=0, Lineáwidth:=8
  2376. {
  2377.   /LineWidth exch 0 250 InRange def
  2378.   /Gray3 exch 0 100 InRange 100 div def
  2379.   /Gray2 exch -1 100 InRange 100 div def
  2380.   /Gray1 exch -1 100 InRange 100 div def
  2381.   /Frequency exch 1 100 InRange def
  2382.  
  2383.   /newfont 10 dict def
  2384.   newfont begin
  2385.  
  2386.   /FontMatrix [2 7 div             0
  2387.                0                   2 7 div
  2388.                0                   0] def
  2389.   /FontType 3 def
  2390.   /FontBBox [-1.73 -1.86 2.36 2.0] def
  2391.   /Encoding 256 array def
  2392.   0 1 255 {Encoding exch /.notdef put} for
  2393.   Encoding 97 /ReptilesStroked put
  2394.   Encoding 98 /ReptileFilled put
  2395.  
  2396.   /CharProcs 3 dict def
  2397.   CharProcs begin
  2398.   /.notdef {} def
  2399.   /ReptilesStroked
  2400.   {
  2401.     %3 sqrt  3 2 div  translate
  2402.  
  2403.     3 sqrt 2 div  1 2 div  moveto
  2404.     3
  2405.     {
  2406.       120 rotate
  2407.  
  2408.       0     0    moveto
  2409.       0.32 -0.40 lineto
  2410.       0.32 -0.48 lineto
  2411.       0    -0.72 lineto
  2412.  
  2413.       0.05 -1.03 moveto
  2414.       0.4  -0.76 lineto
  2415.       0.84 -0.84 lineto
  2416.       0.5  -0.96 lineto
  2417.       0.31 -1.18 lineto
  2418.  
  2419.       0.87 -1.5  moveto
  2420.       0.58 -1.28 lineto
  2421.       0.8  -1.14 lineto
  2422.       0.94 -1.18 lineto
  2423.       1.24 -1.08 lineto
  2424.       1.42 -1.18 lineto
  2425.  
  2426.       1.68 -1.02 moveto
  2427.       1.52 -0.84 lineto
  2428.       1.64 -0.66 lineto
  2429.       1.73 -0.36 lineto
  2430.  
  2431.       1.73  0    moveto
  2432.       1.41 -0.26 lineto
  2433.       1.32 -0.49 lineto
  2434.       1.06 -0.24 lineto
  2435.       1.42  0.18 lineto
  2436.  
  2437.       0.87  0.57 moveto
  2438.       0.87  0.26 lineto
  2439.       0.99  0.26 lineto
  2440.       1.05  0.12 lineto
  2441.       0.82 -0.07 lineto
  2442.       0.68 -0.07 lineto
  2443.       0.62  0.36 lineto
  2444.  
  2445.  
  2446.       3 sqrt 2 div  1 2 div moveto
  2447.  
  2448.     } repeat
  2449.  
  2450.     LineWidth Pointsize div 7 2 div mul setlinewidth
  2451.     stroke
  2452.  
  2453.   } def
  2454.   /ReptileFilled
  2455.   {
  2456.     0     0    moveto
  2457.     0.32 -0.40 lineto
  2458.     0.32 -0.48 lineto
  2459.     0    -0.72 lineto
  2460.  
  2461.    -0.40 -0.55 lineto
  2462.    -0.47 -0.68 lineto
  2463.    -0.42 -0.97 lineto
  2464.    -0.27 -0.99 lineto
  2465.    -0.21 -0.88 lineto
  2466.  
  2467.     0.05 -1.03 lineto
  2468.     0.4  -0.76 lineto
  2469.     0.84 -0.84 lineto
  2470.     0.5  -0.96 lineto
  2471.     0.31 -1.18 lineto
  2472.  
  2473.     0.32 -1.39 lineto
  2474.     0.55 -1.60 lineto
  2475.     0.59 -1.74 lineto
  2476.     0.82 -1.86 lineto
  2477.  
  2478.     0.87 -1.5  lineto
  2479.     0.58 -1.28 lineto
  2480.     0.8  -1.14 lineto
  2481.     0.94 -1.18 lineto
  2482.     1.24 -1.08 lineto
  2483.     1.42 -1.18 lineto
  2484.     1.52 -1.45 lineto
  2485.     1.45 -1.81 lineto
  2486.     1.74 -1.47 lineto
  2487.     1.68 -1.02 lineto
  2488.     1.52 -0.84 lineto
  2489.     1.64 -0.66 lineto
  2490.     1.73 -0.36 lineto
  2491.     2.28 -0.46 lineto
  2492.     2.36 -0.11 lineto
  2493.     2.12 -0.15 lineto
  2494.     1.73  0    lineto
  2495.     1.41 -0.26 lineto
  2496.     1.32 -0.49 lineto
  2497.     1.06 -0.24 lineto
  2498.     1.42  0.18 lineto
  2499.     1.21  0.41 lineto
  2500.     1.11  0.60 lineto
  2501.  
  2502.     0.87  0.57 lineto
  2503.     0.87  0.26 lineto
  2504.     0.99  0.26 lineto
  2505.     1.05  0.12 lineto
  2506.     0.82 -0.07 lineto
  2507.     0.68 -0.07 lineto
  2508.     0.62  0.36 lineto
  2509.     0.26  0.52 lineto
  2510.     0.19  0.48 lineto
  2511.     closepath
  2512.     fill
  2513.   } def
  2514.   end
  2515.  
  2516.   /BuildChar
  2517.   {
  2518.     3 sqrt 3 mul 2 div  3 2 div
  2519.     -1.83 -1.96 2.46 2.1
  2520.     setcachedevice
  2521.     exch begin
  2522.     Encoding exch get
  2523.     CharProcs exch get
  2524.     end
  2525.     exec
  2526.   } def
  2527.   end
  2528.  
  2529.   /Pointsize 2000 Frequency div def
  2530.  
  2531.   /FillFont newfont definefont pop
  2532.   /FillFont findfont Pointsize scalefont setfont
  2533.  
  2534.   /pntsize Pointsize 6 mul 7 div def
  2535.   /HeightDiff Pointsize 2 mul 7 div .49 mul def
  2536.  
  2537.   eoclip newpath
  2538.  
  2539.   currentscreen
  2540.   3 -1 roll
  2541.   pop 120
  2542.   3 1 roll
  2543.   setscreen
  2544.  
  2545.   Bblly pntsize Bbury pntsize add HeightDiff add
  2546.   {
  2547.     Bbllx 1 index moveto
  2548.     {
  2549.       currentpoint
  2550.       1 index exch
  2551.  
  2552.       2 copy 2 copy translate
  2553.       240 rotate
  2554.       Gray1 0 ge
  2555.       { Gray1 1 exch sub setgray
  2556.         (b) show
  2557.       } if
  2558.       0 0 moveto
  2559.       -240 rotate
  2560.       neg exch neg exch translate
  2561.  
  2562.       2 copy translate
  2563.       120 rotate
  2564.       Gray2 0 ge
  2565.       { Gray2 1 exch sub setgray
  2566.         (b) show
  2567.       } if
  2568.       0 0 moveto
  2569.       -120 rotate
  2570.       neg exch neg exch translate
  2571.  
  2572.       Gray3 1 exch sub setgray
  2573.       (b) show
  2574.  
  2575.       currentpoint
  2576.       dup 4 index sub
  2577.       pntsize 2.1 div gt { pntsize sub } if
  2578.       3 -1 roll Bburx gt
  2579.       {pop pop pop exit} if
  2580.       moveto
  2581.     } loop
  2582.   } for
  2583.  
  2584.   LineWidth 0 gt
  2585.   {
  2586.     0 setgray
  2587.     Bblly pntsize Bbury pntsize add
  2588.     {
  2589.       Bbllx 1 index moveto
  2590.       {
  2591.         (a) show
  2592.         currentpoint
  2593.         dup 3 index sub
  2594.         pntsize 2.1 div gt { pntsize sub } if
  2595.         1 index Bburx gt
  2596.         {pop pop pop exit} if
  2597.         moveto
  2598.       } loop
  2599.     } for
  2600.   } if
  2601. } bind def
  2602.  
  2603. %@Fill
  2604. /SpiderWeb %SpiderWeb,5, Lineáwidth:=5, Separation:=300, Maximumáangle:=40, Minimumáangle:=10, Randomáseed:=0
  2605.    { srand
  2606.    /MinAng exch 2 90 InRange def
  2607.    /MaxAng exch MinAng 90 InRange MinAng wDstChck def
  2608.    /Sep exch 10 500 InRange def
  2609.    /Linewidth exch 0 100 InRange def
  2610.  
  2611.    eoclip
  2612.    newpath
  2613.  
  2614.    /dx Bburx Bbllx sub def
  2615.    /dy Bbury Bblly sub def
  2616.    /hyp dx dup mul dy dup mul add sqrt def
  2617.    /DifAng MaxAng MinAng sub def
  2618.  
  2619.    Bbllx Bblly translate
  2620.    dx 2 div dy 2 div translate
  2621.  
  2622.    /theta 0 def
  2623.    /dtheta 0 def
  2624.  
  2625.    {  0 0 moveto
  2626.  
  2627.       /theta theta dtheta add def
  2628.       theta 360 ge
  2629.         { exit } if
  2630.       /dtheta rand DifAng mod MinAng add def
  2631.       theta dtheta add 350 gt
  2632.         { /dtheta 360 theta sub def } if
  2633.  
  2634.       hyp theta cos mul hyp theta sin mul lineto
  2635.  
  2636.       0 Sep hyp
  2637.          {
  2638.          dup theta cos mul
  2639.          1 index theta sin mul
  2640.          moveto
  2641.  
  2642.          dup theta dtheta add cos theta cos add mul
  2643.          1 index theta dtheta add sin theta sin add mul
  2644.          2 index
  2645.          theta 180 add dtheta add
  2646.          theta 180 add
  2647.          arcn
  2648.  
  2649.          pop
  2650.          } for
  2651.       Linewidth setlinewidth
  2652.       stroke
  2653.       } loop
  2654.    } bind def
  2655.  
  2656. %@Fill
  2657. /Spirals %Spirals,4, Size:=150, Lineáwidth:=5, Foregroundágray:=100, Backgroundágray:=0
  2658.    {
  2659.    /BackgroundGrey exch -1 100 InRange def
  2660.    /ForegroundGray exch 0 100 InRange def
  2661.    /Linewidth exch 0 100 InRange def
  2662.    /Size exch 10 500 InRange def
  2663.  
  2664.    eoclip
  2665.    BackgroundGrey 0 ge
  2666.       { BackgroundGrey 100 div 1 exch sub setgray fill }
  2667.       { newpath } ifelse
  2668.  
  2669.    /cx Bburx Bbllx add 2 div def
  2670.    /cy Bbury Bblly add 2 div def
  2671.    /pntsize2 Size 2 div def
  2672.    /cy2 cy pntsize2 add def
  2673.    /hyp Bburx Bbllx sub dup mul
  2674.         Bbury Bblly sub dup mul
  2675.         add sqrt 2 div def
  2676.  
  2677.    ForegroundGray 100 div 1 exch sub setgray
  2678.  
  2679.    Linewidth setlinewidth
  2680.    0 Size hyp
  2681.       { cx cy 2 index 90 270 arc
  2682.         cx cy2 2 index pntsize2 add -90 90 arc
  2683.         pop
  2684.       } for
  2685.    stroke
  2686.    } bind def
  2687.  
  2688. %@Fill
  2689. /Spokes %Spokes,5, Number:=120, Lineáwidth:=5, Horizontal:=0, Vertical:=0, Foregroundágray:=100
  2690.         { %def -- Fill function that fills with spokes
  2691.         /ForegroundGray exch 0 100 InRange def
  2692.     /wY exch 0 100 InRange def
  2693.     /wX exch 0 100 InRange def
  2694.     /LineWidth exch 0 100 InRange def
  2695.     /Number exch 4 360 InRange def
  2696.  
  2697.         eoclip
  2698.         newpath
  2699.         /Flen Bburx Bbllx sub dup mul Bbury Bblly sub dup mul add sqrt def
  2700.         Bbllx Bblly translate
  2701.     Bburx Bbllx sub wX mul 100 div  Bbury Bblly sub wY mul 100 div translate
  2702.  
  2703.     360 Number div
  2704.         Number {
  2705.            0 0 moveto
  2706.            Flen 0 lineto
  2707.            dup rotate
  2708.            } repeat
  2709.         pop
  2710.         ForegroundGray 100 div 1 exch sub setgray
  2711.     LineWidth setlinewidth
  2712.     stroke
  2713.         } bind def
  2714.  
  2715. %@Fill
  2716. /Squares %Squares,4, Frequency:=8, Lineáwidth:=5, Foregroundágray:=100, Backgroundágray:=0
  2717.    {
  2718.    /BackgroundGray exch -1 100 InRange def
  2719.    /ForegroundGray exch 0 100 InRange def
  2720.    /Linewidth      exch 0 100 InRange def
  2721.    /Frequency      exch 2 100 InRange def
  2722.  
  2723.    /newfont 10 dict def
  2724.    newfont begin
  2725.  
  2726.    /FontMatrix [1  0  0
  2727.                 1  0  0] def
  2728.    /FontType 3 def
  2729.    /FontBBox [0 0 1 1] def
  2730.    /Encoding 256 array def
  2731.    0 1 255 {Encoding exch /.notdef put} for
  2732.  
  2733.    /BuildChar
  2734.      { 1  0
  2735.        -0.1 -0.1 1.1 1.1
  2736.        setcachedevice
  2737.        pop begin
  2738.  
  2739.        0 0 moveto
  2740.        0 1 lineto
  2741.        1 1 lineto
  2742.        1 0 lineto
  2743.  
  2744.        Linewidth pntsize div setlinewidth
  2745.        stroke
  2746.  
  2747.       end
  2748.      } def
  2749.    end
  2750.  
  2751.    /pntsize 1000 Frequency div def
  2752.  
  2753.    /FillFont newfont definefont pop
  2754.    /FillFont findfont pntsize scalefont setfont
  2755.  
  2756.    eoclip
  2757.    BackgroundGray 0 ge
  2758.       { BackgroundGray 100 div 1 exch sub setgray fill }
  2759.       { newpath } ifelse
  2760.  
  2761.    ForegroundGray 100 div 1 exch sub setgray
  2762.  
  2763.    Bblly pntsize Bbury
  2764.      { Bbllx exch moveto
  2765.        { (a) show
  2766.          currentpoint
  2767.          pop Bburx gt
  2768.          {exit} if
  2769.        } loop
  2770.      } for
  2771.    } bind def
  2772.  
  2773. %@Fill
  2774. /StarOfDavid %StarOfDavid,4, Frequency:=8, Lineáwidth:=5, Foregroundágray:=100, Backgroundágray:=0
  2775.    {
  2776.    /BackgroundGray exch -1 100 InRange def
  2777.    /ForegroundGray exch 0 100 InRange def
  2778.    /Linewidth      exch 0 100 InRange def
  2779.    /Frequency      exch 2 100 InRange def
  2780.  
  2781.    /newfont 10 dict def
  2782.    newfont begin
  2783.  
  2784.    /FontMatrix [1 3 sqrt 2 mul div  0
  2785.                 0                   1 3 sqrt 2 mul div
  2786.                 0                   0] def
  2787.    /FontType 3 def
  2788.    /FontBBox [0 0 2 3 sqrt 2 mul] def
  2789.    /Encoding 256 array def
  2790.    0 1 255 {Encoding exch /.notdef put} for
  2791.  
  2792.    /BuildChar
  2793.      { 1  3 sqrt
  2794.        -0.1 -0.1 2.1 3 sqrt 2 mul 0.1 add
  2795.        setcachedevice
  2796.        pop begin
  2797.  
  2798.        1 2 div  0 moveto
  2799.        3 2 div  0 lineto
  2800.        2  3 sqrt 2 div lineto
  2801.        3 2 div  3 sqrt lineto
  2802.        1 2 div  3 sqrt lineto
  2803.        0  3 sqrt 2 div lineto
  2804.        closepath
  2805.  
  2806.        Linewidth pntsize div 3 sqrt 2 mul mul setlinewidth
  2807.        stroke
  2808.  
  2809.       end
  2810.      } def
  2811.    end
  2812.  
  2813.    /pntsize 1732 Frequency div def
  2814.  
  2815.    /FillFont newfont definefont pop
  2816.    /FillFont findfont pntsize scalefont setfont
  2817.  
  2818.    eoclip
  2819.    BackgroundGray 0 ge
  2820.       { BackgroundGray 100 div 1 exch sub setgray fill }
  2821.       { newpath } ifelse
  2822.  
  2823.    ForegroundGray 100 div 1 exch sub setgray
  2824.  
  2825.    /ury Bbury pntsize add def
  2826.    Bblly pntsize ury
  2827.      { Bbllx pntsize sub 1 index moveto
  2828.        { (a) show
  2829.          currentpoint
  2830.          dup 3 index sub
  2831.          pntsize 2.1 div gt { pntsize sub } if
  2832.          1 index Bburx gt
  2833.          {pop pop pop exit} if
  2834.          moveto
  2835.        } loop
  2836.      } for
  2837.    } bind def
  2838.  
  2839. %@Fill
  2840. /Stars %Stars,4, Number:=100, Maximumásize:=300, Minimumásize:=3, Randomáseed:=0
  2841.    { srand
  2842.    /MinSize exch 1 1000 InRange def
  2843.    /MaxSize exch MinSize 1000 InRange def
  2844.    /Number exch 1 2000 InRange def
  2845.  
  2846.    /newfont 10 dict def
  2847.    newfont begin
  2848.  
  2849.    /FontMatrix [1  0  0
  2850.                 1  0  0] def
  2851.    /FontType 3 def
  2852.    /FontBBox [0 0 1 1] def
  2853.    /Encoding 256 array def
  2854.    0 1 255 {Encoding exch /.notdef put} for
  2855.  
  2856.    /BuildChar
  2857.      { 1  0
  2858.        -0.1 -0.1 1.1 1.1
  2859.        setcachedevice
  2860.        pop begin
  2861.  
  2862.        1 .5 moveto
  2863.        .5 .5 .5 0 360 arc
  2864.        fill
  2865.  
  2866.        end
  2867.      } def
  2868.    end
  2869.  
  2870.    /FillFont newfont definefont pop
  2871.    /FillFont findfont 2 scalefont setfont
  2872.  
  2873.    /dx Bburx Bbllx sub def
  2874.    /dy Bbury Bblly sub def
  2875.  
  2876.    eoclip
  2877.    0 setgray
  2878.    fill
  2879.  
  2880.    1 setgray
  2881.    /mtx matrix currentmatrix def
  2882.    dx dy mul Number mul 100000 div cvi
  2883.       { rand dx mod Bbllx add
  2884.       rand dy mod Bblly add
  2885.       moveto
  2886.       MaxSize rand  MaxSize MinSize div cvi  mod 1 add div 10 div
  2887.       dup scale
  2888.       (a) show
  2889.       mtx setmatrix
  2890.       } repeat
  2891.  
  2892.    } bind def
  2893.  
  2894. %@Fill
  2895. /StarShapes %StarShapes,5, Points:=5, Frequency:=2, Spacing:=100, Angle:=36, Gray:=100
  2896.    {
  2897.    /Grey exch 0 100 InRange def
  2898.    /Theta exch 1 90 InRange def
  2899.    /Spacing exch 1 300 InRange def
  2900.    /Frequency exch 1 25 InRange def
  2901.    /Points exch 1 15 InRange def
  2902.  
  2903.    /str 1 string def
  2904.    str 0 Points put
  2905.  
  2906.    /newfont 10 dict def
  2907.    newfont begin
  2908.  
  2909.    /FontMatrix [.001                0
  2910.                 0                   .001
  2911.                 0                   0] def
  2912.    /FontType 3 def
  2913.    /FontBBox [0 0 500 1000] def
  2914.  
  2915.    /Encoding 256 array def
  2916.    0 1 255 {Encoding exch /.notdef put} for
  2917.  
  2918.    /BuildChar
  2919.      {Spacing 100 div 500 mul  dup
  2920.       -0.1 -0.1 500.1 1000.1
  2921.       setcachedevice
  2922.       exch begin
  2923.  
  2924.       250 250 translate
  2925.       250 250 scale
  2926.       90 rotate
  2927.  
  2928.       dup
  2929.       180 exch div dup sin exch cos div
  2930.       Theta 2 div dup sin exch cos div
  2931.  
  2932.       1 0 moveto
  2933.       2 index
  2934.          {
  2935.          360 3 index div rotate
  2936.          dup dup 3 index add div
  2937.          dup 3 index mul neg
  2938.          lineto
  2939.          1 0 lineto
  2940.          } repeat
  2941.       closepath
  2942.  
  2943.       fill
  2944.       pop pop pop
  2945.  
  2946.       end
  2947.      }def
  2948.    end
  2949.  
  2950.    /pntsize 100000 Frequency div Spacing div def
  2951.  
  2952.    /FillFont newfont definefont pop
  2953.    /FillFont findfont pntsize scalefont setfont
  2954.  
  2955.    /increment Spacing 100 div pntsize mul def
  2956.  
  2957.    eoclip newpath
  2958.  
  2959.    Grey 100 div 1 exch sub setgray
  2960.    Bblly increment Bbury
  2961.      { Bbllx 1 index moveto
  2962.        { str show
  2963.          currentpoint
  2964.          dup 3 index sub
  2965.          increment 2.1 div gt { increment sub } if
  2966.          1 index Bburx gt
  2967.          {pop pop pop exit} if
  2968.          moveto
  2969.        } loop
  2970.      } for
  2971.    } bind def
  2972.  
  2973. %@Fill
  2974. /StoneWall %StoneWall,4, Frequency:=15, Maximumágray:=100, Minimumágray:=0, Lineáwidth:=5
  2975.    {
  2976.    /Linewidth exch 0 100 InRange def
  2977.    /MinGrey exch 0 100 InRange def
  2978.    /MaxGrey exch MinGrey 100 InRange def
  2979.    /Frequency exch 1 50 InRange def
  2980.  
  2981.    /DifGrey MaxGrey MinGrey sub def
  2982.    DifGrey 0 eq
  2983.       { /DifGrey 1 def
  2984.       } if
  2985.    Linewidth Frequency mul 250 div setlinewidth
  2986.    eoclip newpath
  2987.    0 srand
  2988.  
  2989.    currentscreen
  2990.    3 -1 roll
  2991.    pop 100
  2992.    3 1 roll
  2993.    setscreen
  2994.  
  2995.    /dy Bbury Bblly sub def
  2996.    /dx Bburx Bbllx sub def
  2997.    Bbllx Bbury translate
  2998.    250 Frequency div dup scale
  2999.  
  3000.    dy 920 div Frequency mul cvi {
  3001.       0 0 moveto
  3002.       /x0 0 def
  3003.       /y0 0 def
  3004.       /x1 0 def
  3005.       /y1 0 def
  3006.       /x2 0 def
  3007.       /y2 0 def
  3008.       /x3 0 def
  3009.       /y3 0 def
  3010.       0 5 dx 200 div Frequency mul
  3011.          { rand 50 mod 25 div 1 sub add
  3012.          x3 y3 moveto
  3013.          x2 y2 x1 y1 x0 y0 curveto
  3014.          dup rand 30 mod 15 div neg 2 sub
  3015.          2 copy
  3016.          /y0 exch def
  3017.          /x0 exch def
  3018.          lineto
  3019.          dup rand 50 mod 10 div 2.5 sub add rand 50 mod 10 div neg
  3020.          1 index rand 50 mod 10 div
  3021.          4 index rand 30 mod 15 div 2 add
  3022.          6 copy
  3023.          /y3 exch def
  3024.          /x3 exch def
  3025.          /y2 exch def
  3026.          /x2 exch def
  3027.          /y1 exch def
  3028.          /x1 exch def
  3029.          curveto
  3030.          pop
  3031.          closepath
  3032.          gsave
  3033.          rand DifGrey mod MinGrey add 100 div 1 exch sub setgray fill
  3034.          grestore
  3035.          0 setgray stroke
  3036.          } for
  3037.       0 -4 translate
  3038.       } repeat
  3039.    } bind def
  3040.  
  3041. %@Fill
  3042. /Text %Text,5, Font:=1, Character:=67, Frequency:=4, Spacing:=100, Backgroundágray:=0
  3043.    {
  3044.    /BackGrey exch -1 100 InRange def
  3045.    /Spacing exch 30 300 InRange def
  3046.    /Frequency exch 1 50 InRange def
  3047.    /Character exch 33 255 InRange def
  3048.    /Font exch 1 35 InRange def
  3049.  
  3050.    /pntsize 100000 Frequency div Spacing div def
  3051.    Font  1 eq { /Times-Roman } if
  3052.    Font  2 eq { /Times-Italic } if
  3053.    Font  3 eq { /Times-Bold } if
  3054.    Font  4 eq { /Times-BoldItalic } if
  3055.    Font  5 eq { /Helvetica } if
  3056.    Font  6 eq { /Helvetica-Oblique } if
  3057.    Font  7 eq { /Helvetica-Bold } if
  3058.    Font  8 eq { /Helvetica-BoldOblique } if
  3059.    Font  9 eq { /Courier } if
  3060.    Font 10 eq { /Courier-Oblique } if
  3061.    Font 11 eq { /Courier-Bold } if
  3062.    Font 12 eq { /Courier-BoldOblique } if
  3063.    Font 13 eq { /Symbol } if
  3064.    Font 14 eq { /AvantGarde-Book } if
  3065.    Font 15 eq { /AvantGarde-BookOblique } if
  3066.    Font 16 eq { /AvantGarde-Demi } if
  3067.    Font 17 eq { /AvantGarde-DemiOblique } if
  3068.    Font 18 eq { /Bookman-Demi } if
  3069.    Font 19 eq { /Bookman-DemiItalic } if
  3070.    Font 20 eq { /Bookman-Light } if
  3071.    Font 21 eq { /Bookman-LightItalic } if
  3072.    Font 22 eq { /Helvetica-Narrow } if
  3073.    Font 23 eq { /Helvetica-Narrow-Bold } if
  3074.    Font 24 eq { /Helvetica-Narrow-BoldOblique } if
  3075.    Font 25 eq { /Helvetica-Narrow-Oblique } if
  3076.    Font 26 eq { /NewCenturySchlbk-Roman } if
  3077.    Font 27 eq { /NewCenturySchlbk-Bold } if
  3078.    Font 28 eq { /NewCenturySchlbk-Italic } if
  3079.    Font 29 eq { /NewCenturySchlbk-BoldItalic } if
  3080.    Font 30 eq { /Palatino-Roman } if
  3081.    Font 31 eq { /Palatino-Bold } if
  3082.    Font 32 eq { /Palatino-Italic } if
  3083.    Font 33 eq { /Palatino-BoldItalic } if
  3084.    Font 34 eq { /ZapfChancery-MediumItalic } if
  3085.    Font 35 eq { /ZapfDingbats } if
  3086.    findfont pntsize scalefont setfont
  3087.  
  3088.    /str 1 string def
  3089.    str 0 Character put
  3090.  
  3091.    /increment Spacing 100 div pntsize mul 2 mul def
  3092.  
  3093.    eoclip
  3094.    BackGrey 0 ge
  3095.       { BackGrey 100 div 1 exch sub setgray fill }
  3096.       { newpath } ifelse
  3097.  
  3098.    /Bbury Bbury pntsize add def
  3099.  
  3100.    0 setgray
  3101.    Bblly increment Bbury
  3102.      { Bbllx 1 index moveto
  3103.        { str show
  3104.          currentpoint increment 2 div add
  3105.          dup 3 index sub
  3106.          increment 2.1 div gt { increment sub } if
  3107.          1 index Bburx gt
  3108.          {pop pop pop exit} if
  3109.          moveto
  3110.        } loop
  3111.      } for
  3112.    } bind def
  3113.  
  3114. %@Fill
  3115. /Tiles %Tiles,4, Frequency:=8, Lineáwidth:=5, Foregroundágray:=100, Backgroundágray:=0
  3116.    {
  3117.    /BackgroundGray exch -1 100 InRange def
  3118.    /ForegroundGray exch 0 100 InRange def
  3119.    /Linewidth      exch 0 100 InRange def
  3120.    /Frequency      exch 2 100 InRange def
  3121.  
  3122.    /newfont 10 dict def
  3123.    newfont begin
  3124.  
  3125.    /FontMatrix [1  0  0
  3126.                 1  0  0] def
  3127.    /FontType 3 def
  3128.    /FontBBox [0 0 2 1] def
  3129.    /Encoding 256 array def
  3130.    0 1 255 {Encoding exch /.notdef put} for
  3131.  
  3132.    /BuildChar
  3133.      { 2  .5
  3134.        -0.1 -0.1 2.1 1.1
  3135.        setcachedevice
  3136.        pop begin
  3137.  
  3138.        0   0 moveto
  3139.        1.5 0 lineto
  3140.        1.75  0 .25 180 90 arcn
  3141.        1.75 .5 .25 -90 90 arc
  3142.        1.75  1 .25 270 180 arcn
  3143.        0   1 lineto
  3144.  
  3145.        Linewidth pntsize div setlinewidth
  3146.        stroke
  3147.  
  3148.        end
  3149.      } def
  3150.    end
  3151.  
  3152.    /pntsize 500 Frequency div def
  3153.  
  3154.    /FillFont newfont definefont pop
  3155.    /FillFont findfont pntsize scalefont setfont
  3156.  
  3157.    eoclip
  3158.    BackgroundGray 0 ge
  3159.       { BackgroundGray 100 div 1 exch sub setgray fill }
  3160.       { newpath } ifelse
  3161.  
  3162.    ForegroundGray 100 div 1 exch sub setgray
  3163.  
  3164.    Bblly pntsize Bbury
  3165.      { Bbllx 1 index moveto
  3166.        { (a) show
  3167.          currentpoint
  3168.          dup 3 index sub
  3169.          pntsize 2.1 div gt { pntsize sub } if
  3170.          1 index Bburx gt
  3171.          {pop pop pop exit} if
  3172.          moveto
  3173.        } loop
  3174.      } for
  3175.    } bind def
  3176.  
  3177. %@Fill
  3178. /TreeRings %TreeRings,5, Maxádistance:=150, Minádistance:=0, Lineáwidth:=5, Backgroundágray:=0, Randomáseed:=0
  3179.    { srand
  3180.    /BackGrey exch -1 100 InRange def
  3181.    /LineWidth exch 0 100 InRange def
  3182.    /MinDist exch 0 500 InRange def
  3183.    /MaxDist exch MinDist 500 InRange MinDist wDstChck def
  3184.  
  3185.    eoclip
  3186.    BackGrey 0 ge
  3187.       { BackGrey 100 div 1 exch sub setgray fill }
  3188.       { newpath } ifelse
  3189.  
  3190.    /cx Bburx Bbllx add 2 div def
  3191.    /cy Bbury Bblly add 2 div def
  3192.    /pntsize MaxDist MinDist sub def
  3193.    /hyp Bburx Bbllx sub dup mul Bbury Bblly sub dup mul add sqrt def
  3194.  
  3195.    /wr 0 def
  3196.    0 setgray
  3197.    LineWidth setlinewidth
  3198.  
  3199.       {
  3200.       /wr rand pntsize mod MinDist add wr add def
  3201.       cx wr add  cy moveto
  3202.       cx cy wr 0 360 arc
  3203.       stroke
  3204.       wr hyp gt {exit} if
  3205.       } loop
  3206.    } bind def
  3207.  
  3208. %@Fill
  3209. /Triangle %Triangle,4, Frequency:=8, Lineáwidth:=5, Foregroundágray:=100, Backgroundágray:=0
  3210.    {
  3211.    /BackgroundGray exch -1 100 InRange def
  3212.    /ForegroundGray exch 0 100 InRange def
  3213.    /Linewidth      exch 0 100 InRange def
  3214.    /Frequency      exch 2 100 InRange def
  3215.  
  3216.    /newfont 10 dict def
  3217.    newfont begin
  3218.  
  3219.    /FontMatrix  [ 1 3 sqrt div  0
  3220.                   0             1 3 sqrt div
  3221.                   0             0] def
  3222.    /FontType 3 def
  3223.    /FontBBox [0 0 1 3 sqrt] def
  3224.    /Encoding 256 array def
  3225.    0 1 255 {Encoding exch /.notdef put} for
  3226.  
  3227.    /BuildChar
  3228.      { 1  0
  3229.        -0.1 -0.1 1.1 3 sqrt 0.1 add
  3230.        setcachedevice
  3231.        pop begin
  3232.  
  3233.        0 0 moveto
  3234.        1 3 sqrt lineto
  3235.        0 3 sqrt lineto
  3236.        1 0 lineto
  3237.        closepath
  3238.  
  3239.        0 3 sqrt 2 div moveto
  3240.        1 3 sqrt 2 div lineto
  3241.  
  3242.        Linewidth pntsize div 3 sqrt mul setlinewidth
  3243.        stroke
  3244.  
  3245.       end
  3246.      } def
  3247.    end
  3248.  
  3249.    /pntsize 1732 Frequency div def
  3250.    /FillFont newfont definefont pop
  3251.    /FillFont findfont pntsize scalefont setfont
  3252.  
  3253.    eoclip
  3254.    BackgroundGray 0 ge
  3255.       { BackgroundGray 100 div 1 exch sub setgray fill }
  3256.       { newpath } ifelse
  3257.  
  3258.    ForegroundGray 100 div 1 exch sub setgray
  3259.  
  3260.    Bblly pntsize Bbury
  3261.      { Bbllx pntsize sub pntsize 3 sqrt div Bburx
  3262.        { 1 index moveto
  3263.        (a) show
  3264.        } for
  3265.      pop
  3266.      } for
  3267.    } bind def
  3268.  
  3269. %@Fill
  3270. /Waves %Waves,5, Frequency:=6, Lineáwidth:=5, Foregroundágray:=100, Backgroundágray:=0, Spacingá(%):=100
  3271.    {
  3272.    /Spacing        exch 30 300 InRange def
  3273.    /BackgroundGray exch -1 100 InRange def
  3274.    /ForegroundGray exch 0 100 InRange def
  3275.    /Linewidth      exch  0 100 InRange def
  3276.    /Frequency      exch  2 100 InRange def
  3277.  
  3278.    /newfont 10 dict def
  3279.    newfont begin
  3280.  
  3281.    /FontMatrix [1 84 div   0
  3282.                 0          1 84 div
  3283.                 0          0] def
  3284.    /FontType 3 def
  3285.    /FontBBox [37 56 111 114] def
  3286.    /Encoding 256 array def
  3287.    0 1 255 {Encoding exch /.notdef put} for
  3288.  
  3289.    /BuildChar
  3290.      { 74  0
  3291.        36.9 55.9 111.1 114.1
  3292.        setcachedevice
  3293.        pop begin
  3294.  
  3295.        1 1.5 scale
  3296.  
  3297.        37 38 moveto
  3298.        76 38 79 73 111 57 curveto
  3299.        80 60 80 38 111 38 curveto
  3300.  
  3301.        Linewidth pntsize div 84 mul setlinewidth
  3302.        stroke
  3303.  
  3304.       end
  3305.      } def
  3306.    end
  3307.  
  3308.    /pntsize 783 Frequency div def
  3309.  
  3310.    /FillFont newfont definefont pop
  3311.    /FillFont findfont pntsize scalefont setfont
  3312.  
  3313.    /Height pntsize Spacing 100 div mul def
  3314.  
  3315.    /Bbllx Bbllx Height sub def
  3316.    /Bblly Bblly Height sub def
  3317.    /Bburx Bburx Height add def
  3318.    /Bbury Bbury Height add def
  3319.  
  3320.    eoclip
  3321.    BackgroundGray 0 ge
  3322.       { BackgroundGray 100 div 1 exch sub setgray fill }
  3323.       { newpath } ifelse
  3324.  
  3325.    ForegroundGray 100 div 1 exch sub setgray
  3326.    Bblly Height Bbury
  3327.      { Bbllx exch moveto
  3328.        { (a) show
  3329.          currentpoint
  3330.          pop Bburx gt
  3331.          {exit} if
  3332.        } loop
  3333.      } for
  3334.    } bind def
  3335.  
  3336. %------ Color PostScript fills added for v6.0 
  3337.  
  3338. %@Fill
  3339. /ColorBubbles %ColorBubbles,5, Numberá(sqáinch):=25, Maxásize:=300, Minásize:=10, Lineáwidth:=10, Randomáseed:=0
  3340.    { srand
  3341.    /LineWidth exch 0 50 InRange def
  3342.    /MinSize exch 1 1000 InRange def
  3343.    /MaxSize exch MinSize 1000 InRange def
  3344.    /Number exch 1 250 InRange def
  3345.  
  3346.          /SetRandomRGB
  3347.          {
  3348.             3    %put 3 random numbers between 0 and 1 on the stack
  3349.             {rand 100 mod 1 add 100 div 1 exch sub}
  3350.             repeat
  3351.              setrgbcolor
  3352.          } def
  3353.  
  3354.    eoclip
  3355.    newpath
  3356.    /pntsize MaxSize MinSize div cvi def
  3357.    /dx Bburx Bbllx sub def
  3358.    /dy Bbury Bblly sub def
  3359.  
  3360.    dx dy mul Number mul 1000000 div cvi
  3361.    {  rand dx mod Bbllx add
  3362.       rand dy mod Bblly add
  3363.       rand pntsize mod 1 add pntsize exch div MinSize mul
  3364.       3 copy
  3365.       2 index add
  3366.       exch
  3367.       moveto
  3368.       pop
  3369.       0 360 arc
  3370.       gsave
  3371.  
  3372.       SetRandomRGB
  3373.  
  3374.       LineWidth setlinewidth
  3375.       stroke
  3376.       grestore
  3377.  
  3378.       1 setgray
  3379.       fill
  3380.       } repeat
  3381.  
  3382.    } bind def
  3383.  
  3384. %@Fill
  3385. /ColorCircles %ColorCircles,4, Numberá(sqáinch):=25, Maxásize:=300, Minásize:=10, Randomáseed:=0
  3386.    { srand
  3387.    /MinSize exch 1 1000 InRange def
  3388.    /MaxSize exch MinSize 1000 InRange def
  3389.    /Number exch 1 250 InRange def
  3390.  
  3391.          /SetRandomRGB
  3392.          {
  3393.             3    %put 3 random numbers between 0 and 1 on the stack
  3394.             {rand 100 mod 1 add 100 div 1 exch sub}
  3395.             repeat
  3396.              setrgbcolor
  3397.          } def
  3398.  
  3399.    eoclip
  3400.    newpath
  3401.    /pntsize MaxSize MinSize div cvi def
  3402.    /dx Bburx Bbllx sub def
  3403.    /dy Bbury Bblly sub def
  3404.  
  3405.    dx dy mul Number mul 1000000 div cvi
  3406.    {  rand dx mod Bbllx add
  3407.       rand dy mod Bblly add
  3408.       rand pntsize mod 1 add pntsize exch div MinSize mul
  3409.       3 copy
  3410.       2 index add
  3411.       exch
  3412.       moveto
  3413.       pop
  3414.       0 360 arc
  3415.       
  3416.       SetRandomRGB
  3417.  
  3418.       fill
  3419.  
  3420.         } repeat
  3421.  
  3422.    } bind def
  3423.  
  3424. %@Fill
  3425. /ColorCrosshatching %ColorCrosshatching,5, Maxádistance:=75, Minádistance:=0, Lineáwidth:=5, Angle:=45, Randomáseed:=0
  3426.    { srand
  3427.    /Angle exch -180 180 InRange def
  3428.    /LineWidth exch 0 100 InRange def
  3429.    /MinDist exch 0 500 InRange def
  3430.    /MaxDist exch MinDist 500 InRange MinDist wDstChck def
  3431.  
  3432.          /SetRandomRGB
  3433.          {
  3434.             3    %put 3 random numbers between 0 and 1 on the stack
  3435.             {rand 100 mod 1 add 100 div 1 exch sub}
  3436.             repeat
  3437.              setrgbcolor
  3438.          } def
  3439.  
  3440.    eoclip
  3441.    newpath
  3442.  
  3443.    /pntsize MaxDist MinDist sub def
  3444.    /dx2 Bburx Bbllx sub 2 div def
  3445.    /dy2 Bbury Bblly sub 2 div def
  3446.    /hyp2 dx2 dup mul dy2 dup mul add sqrt def
  3447.  
  3448.    Bbllx Bblly translate
  3449.    dx2 dy2 translate
  3450.    Angle rotate
  3451.    LineWidth setlinewidth
  3452.  
  3453.    /wd hyp2 neg def
  3454.       { /wd rand pntsize mod MinDist add wd add def
  3455.       wd hyp2 neg moveto
  3456.       wd hyp2 lineto
  3457.  
  3458.             SetRandomRGB
  3459.             stroke
  3460.  
  3461.       wd hyp2 gt {exit} if
  3462.       } loop
  3463.  
  3464.    Angle -2 mul rotate
  3465.    /wd hyp2 neg def
  3466.       { /wd rand pntsize mod MinDist add wd add def
  3467.       wd hyp2 neg moveto
  3468.       wd hyp2 lineto
  3469.  
  3470.             SetRandomRGB
  3471.             stroke
  3472.  
  3473.       wd hyp2 gt {exit} if
  3474.       } loop
  3475.  
  3476.    } bind def
  3477.  
  3478. %@Fill
  3479. /ColorFishscale %ColorFishscale,3, Frequency:=8, Lineáwidth:=5, Backgroundágray:=0
  3480.    {
  3481.    /BackgroundGray exch -1 100 InRange def
  3482.    /Linewidth      exch 0 100 InRange def
  3483.    /Frequency      exch 2 100 InRange def
  3484.  
  3485.          /SetRandomRGB
  3486.          {
  3487.             3    %put 3 random numbers between 0 and 1 on the stack
  3488.             {rand 100 mod 1 add 100 div 1 exch sub}
  3489.             repeat
  3490.              setrgbcolor
  3491.          } def
  3492.  
  3493.    /newfont 10 dict def
  3494.    newfont begin
  3495.  
  3496.    /FontMatrix [1  0  0
  3497.                 1  0  0] def
  3498.    /FontType 3 def
  3499.    /FontBBox [0 0 1 1] def
  3500.    /Encoding 256 array def
  3501.    0 1 255 {Encoding exch /.notdef put} for
  3502.  
  3503.    /BuildChar
  3504.      { 1  0
  3505.        0 0 1 1
  3506.        setcachedevice
  3507.        pop begin
  3508.  
  3509.        0.5 0.5 0.5 360 180 arcn
  3510.        0 1 0.5 270 360 arc
  3511.        1 1 0.5 180 270 arc
  3512.  
  3513.        Linewidth pntsize div setlinewidth
  3514.        stroke
  3515.  
  3516.       end
  3517.      } def
  3518.    end
  3519.  
  3520.    /pntsize 1000 Frequency div def
  3521.    /FillFont newfont definefont pop
  3522.    /FillFont findfont pntsize scalefont setfont
  3523.  
  3524.    eoclip
  3525.    BackgroundGray 0 ge
  3526.       { BackgroundGray 100 div 1 exch sub setgray fill }
  3527.       { newpath } ifelse
  3528.  
  3529.     Bblly pntsize Bbury
  3530.       { Bbllx exch moveto
  3531.         {
  3532.                   SetRandomRGB
  3533.                     
  3534.                     (a) show
  3535.           currentpoint
  3536.           pop Bburx gt
  3537.           {exit} if
  3538.         } loop
  3539.       } for
  3540.     } bind def
  3541.  
  3542. %@Fill
  3543. /GreenGrass %GreenGrass,5, Number:=100, Maximumásize:=35, Minimumásize:=7, Gray:=0, Randomáseed:=0
  3544.     { srand
  3545.     /Grey exch -1 100 InRange def
  3546.     /MinSize exch 1 100 InRange def
  3547.     /MaxSize exch MinSize 100 InRange MinSize wDstChck def
  3548.     /Number exch 1 500 InRange def
  3549.  
  3550.     eoclip
  3551.     Grey 0 ge
  3552.        { Grey 100 div 1 exch sub setgray fill }
  3553.        { newpath } ifelse
  3554.  
  3555.     /Bbllx Bbllx MaxSize sub def
  3556.     /Bblly Bblly MaxSize sub def
  3557.  
  3558.     /dx Bburx Bbllx sub def
  3559.     /dy Bbury Bblly sub def
  3560.     /dSize MaxSize MinSize sub def
  3561.  
  3562.     dx dy mul 1000000 div Number mul cvi
  3563.        {
  3564.  
  3565.        matrix currentmatrix
  3566.  
  3567.        rand dx mod Bbllx add
  3568.        rand dy mod Bblly add
  3569.        translate
  3570.  
  3571.        rand dSize mod MinSize add
  3572.        dup scale
  3573.  
  3574.        -0.5 0 moveto
  3575.        rand 14 mod 7 sub
  3576.        -0.5 3  2 index 3 div 0.3 sub 10  4 index 10 curveto
  3577.        3 div 0.3 add 10 0.5 3 0.5 0 curveto
  3578.              closepath
  3579.  
  3580.        gsave
  3581.              0                                                                            %0 red
  3582.              rand 100 mod 1 add 100 div 1 exch sub    %random green
  3583.              dup 0.7 lt {pop 0.7} if                                 %above .7
  3584.              0                                                                            %0 blue
  3585.               setrgbcolor
  3586.        fill
  3587.        grestore
  3588.  
  3589.        0.1 setlinewidth
  3590.        0 setgray
  3591.        stroke
  3592.  
  3593.        setmatrix
  3594.  
  3595.        } repeat
  3596.  
  3597.      } bind def
  3598.  
  3599. %@Fill
  3600. /ColorHatching %ColorHatching,5, Maxádistance:=75, Minádistance:=0, Lineáwidth:=5, Angle:=45, Randomáseed:=0
  3601.    { srand
  3602.    /Angle exch -180 180 InRange def
  3603.    /LineWidth exch 0 100 InRange def
  3604.    /MinDist exch 0 500 InRange def
  3605.    /MaxDist exch MinDist 500 InRange MinDist wDstChck def
  3606.  
  3607.      /SetRandomRGB
  3608.      {
  3609.          3    %put 3 random numbers between 0 and 1 on the stack
  3610.          {rand 100 mod 1 add 100 div 1 exch sub}
  3611.          repeat
  3612.          setrgbcolor
  3613.      } def
  3614.  
  3615.    eoclip
  3616.    newpath
  3617.  
  3618.    /pntsize MaxDist MinDist sub def
  3619.    /dx2 Bburx Bbllx sub 2 div def
  3620.    /dy2 Bbury Bblly sub 2 div def
  3621.    /hyp2 dx2 dup mul dy2 dup mul add sqrt def
  3622.  
  3623.    Bbllx Bblly translate
  3624.    dx2 dy2 translate
  3625.    Angle rotate
  3626.    LineWidth setlinewidth
  3627.  
  3628.    /wd hyp2 neg def
  3629.  
  3630.       { /wd rand pntsize mod MinDist add wd add def
  3631.       wd hyp2 neg moveto
  3632.       wd hyp2 lineto
  3633.  
  3634.             SetRandomRGB
  3635.  
  3636.       stroke
  3637.       wd hyp2 gt {exit} if
  3638.       } loop
  3639.  
  3640.    } bind def
  3641.  
  3642. %@Fill
  3643. /GreenLeaves %GreenLeaves,5, Numberá(sqáinch):=50, Maximumágreen:=100, Minimumágreen:=70, Maximumásize:=100, Minimumásize:=10
  3644.    {
  3645.    /MinSize exch 1 200 InRange def
  3646.    /MaxSize exch MinSize 200 InRange MinSize wDstChck def
  3647.    /MinGreen exch 0 100 InRange def
  3648.    /MaxGreen exch MinGreen 100 InRange def
  3649.    /Number exch 1 250 InRange def
  3650.  
  3651.    eoclip newpath
  3652.    currentscreen
  3653.    3 -1 roll
  3654.    pop 90
  3655.    3 1 roll
  3656.    setscreen
  3657.  
  3658.    /dx Bburx Bbllx sub def
  3659.    /dy Bbury Bblly sub def
  3660.  
  3661.    dx dy mul Number mul 1000000 div cvi
  3662.       {
  3663.       matrix currentmatrix
  3664.  
  3665.       rand dx mod Bbllx add
  3666.       rand dy mod Bblly add
  3667.       translate
  3668.  
  3669.       rand 360 mod
  3670.       rotate
  3671.  
  3672.       MaxSize MinSize eq
  3673.         { Maxsize 10.8 div }
  3674.         { rand MaxSize MinSize sub mod MinSize add 10.8 div } ifelse
  3675.       dup scale
  3676.  
  3677.       17 0 moveto
  3678.       65 -18 106 -13 125 0 curveto
  3679.       106 13  65  18  17 0 curveto
  3680.       gsave
  3681.             0    % 0 red
  3682.       MaxGreen MinGreen eq
  3683.         { MaxGreen 100 div }
  3684.         { rand MaxGreen MinGreen sub mod MinGreen add 100 div } ifelse
  3685.             0 % 0 blue
  3686.       setrgbcolor
  3687.       fill
  3688.       grestore
  3689.       0.3 setlinewidth
  3690.       0 setgray
  3691.       stroke
  3692.  
  3693.       setmatrix
  3694.  
  3695.       } repeat
  3696.  
  3697.    } bind def
  3698.  
  3699. %@Fill
  3700. /ColorLeaves %ColorLeaves,3, Numberá(sqáinch):=50, Maximumásize:=100, Minimumásize:=10
  3701.    {
  3702.    /MinSize exch 1 200 InRange def
  3703.    /MaxSize exch MinSize 200 InRange MinSize wDstChck def
  3704.    /Number exch 1 250 InRange def
  3705.  
  3706.          /SetRandomRGB
  3707.          {
  3708.             3    %put 3 random numbers between 0 and 1 on the stack
  3709.             {rand 100 mod 1 add 100 div 1 exch sub}
  3710.             repeat
  3711.              setrgbcolor
  3712.          } def
  3713.  
  3714.    eoclip newpath
  3715.    currentscreen
  3716.    3 -1 roll
  3717.    pop 90
  3718.    3 1 roll
  3719.    setscreen
  3720.  
  3721.    /dx Bburx Bbllx sub def
  3722.    /dy Bbury Bblly sub def
  3723.  
  3724.    dx dy mul Number mul 1000000 div cvi
  3725.       {
  3726.       matrix currentmatrix
  3727.  
  3728.       rand dx mod Bbllx add
  3729.       rand dy mod Bblly add
  3730.       translate
  3731.  
  3732.       rand 360 mod
  3733.       rotate
  3734.  
  3735.       MaxSize MinSize eq
  3736.         { Maxsize 10.8 div }
  3737.         { rand MaxSize MinSize sub mod MinSize add 10.8 div } ifelse
  3738.       dup scale
  3739.  
  3740.       17 0 moveto
  3741.       65 -18 106 -13 125 0 curveto
  3742.       106 13  65  18  17 0 curveto
  3743.       gsave
  3744.  
  3745.       SetRandomRGB
  3746.  
  3747.       fill
  3748.       grestore
  3749.       0.3 setlinewidth
  3750.       0 setgray
  3751.       stroke
  3752.  
  3753.       setmatrix
  3754.  
  3755.       } repeat
  3756.  
  3757.    } bind def
  3758.  
  3759. %@Fill
  3760. /ColorReptiles %ColorReptiles,2, Frequency:=4, Lineáwidth:=8
  3761. {
  3762.   /LineWidth exch 0 250 InRange def
  3763.   /Frequency exch 1 100 InRange def
  3764.  
  3765.     /SetRandomRGB
  3766.     {
  3767.         3    %put 3 random numbers between 0 and 1 on the stack
  3768.         {rand 100 mod 1 add 100 div 1 exch sub}
  3769.         repeat
  3770.         setrgbcolor
  3771.     } def
  3772.  
  3773.   /newfont 10 dict def
  3774.   newfont begin
  3775.  
  3776.   /FontMatrix [2 7 div             0
  3777.                0                   2 7 div
  3778.                0                   0] def
  3779.   /FontType 3 def
  3780.   /FontBBox [-1.73 -1.86 2.36 2.0] def
  3781.   /Encoding 256 array def
  3782.   0 1 255 {Encoding exch /.notdef put} for
  3783.   Encoding 97 /ReptilesStroked put
  3784.   Encoding 98 /ReptileFilled put
  3785.  
  3786.   /CharProcs 3 dict def
  3787.   CharProcs begin
  3788.   /.notdef {} def
  3789.   /ReptilesStroked
  3790.   {
  3791.     %3 sqrt  3 2 div  translate
  3792.  
  3793.     3 sqrt 2 div  1 2 div  moveto
  3794.     3
  3795.     {
  3796.       120 rotate
  3797.  
  3798.       0     0    moveto
  3799.       0.32 -0.40 lineto
  3800.       0.32 -0.48 lineto
  3801.       0    -0.72 lineto
  3802.  
  3803.       0.05 -1.03 moveto
  3804.       0.4  -0.76 lineto
  3805.       0.84 -0.84 lineto
  3806.       0.5  -0.96 lineto
  3807.       0.31 -1.18 lineto
  3808.  
  3809.       0.87 -1.5  moveto
  3810.       0.58 -1.28 lineto
  3811.       0.8  -1.14 lineto
  3812.       0.94 -1.18 lineto
  3813.       1.24 -1.08 lineto
  3814.       1.42 -1.18 lineto
  3815.  
  3816.       1.68 -1.02 moveto
  3817.       1.52 -0.84 lineto
  3818.       1.64 -0.66 lineto
  3819.       1.73 -0.36 lineto
  3820.  
  3821.       1.73  0    moveto
  3822.       1.41 -0.26 lineto
  3823.       1.32 -0.49 lineto
  3824.       1.06 -0.24 lineto
  3825.       1.42  0.18 lineto
  3826.  
  3827.       0.87  0.57 moveto
  3828.       0.87  0.26 lineto
  3829.       0.99  0.26 lineto
  3830.       1.05  0.12 lineto
  3831.       0.82 -0.07 lineto
  3832.       0.68 -0.07 lineto
  3833.       0.62  0.36 lineto
  3834.  
  3835.  
  3836.       3 sqrt 2 div  1 2 div moveto
  3837.  
  3838.     } repeat
  3839.  
  3840.     LineWidth Pointsize div 7 2 div mul setlinewidth
  3841.     stroke
  3842.  
  3843.   } def
  3844.   /ReptileFilled
  3845.   {
  3846.     0     0    moveto
  3847.     0.32 -0.40 lineto
  3848.     0.32 -0.48 lineto
  3849.     0    -0.72 lineto
  3850.  
  3851.    -0.40 -0.55 lineto
  3852.    -0.47 -0.68 lineto
  3853.    -0.42 -0.97 lineto
  3854.    -0.27 -0.99 lineto
  3855.    -0.21 -0.88 lineto
  3856.  
  3857.     0.05 -1.03 lineto
  3858.     0.4  -0.76 lineto
  3859.     0.84 -0.84 lineto
  3860.     0.5  -0.96 lineto
  3861.     0.31 -1.18 lineto
  3862.  
  3863.     0.32 -1.39 lineto
  3864.     0.55 -1.60 lineto
  3865.     0.59 -1.74 lineto
  3866.     0.82 -1.86 lineto
  3867.  
  3868.     0.87 -1.5  lineto
  3869.     0.58 -1.28 lineto
  3870.     0.8  -1.14 lineto
  3871.     0.94 -1.18 lineto
  3872.     1.24 -1.08 lineto
  3873.     1.42 -1.18 lineto
  3874.     1.52 -1.45 lineto
  3875.     1.45 -1.81 lineto
  3876.     1.74 -1.47 lineto
  3877.     1.68 -1.02 lineto
  3878.     1.52 -0.84 lineto
  3879.     1.64 -0.66 lineto
  3880.     1.73 -0.36 lineto
  3881.     2.28 -0.46 lineto
  3882.     2.36 -0.11 lineto
  3883.     2.12 -0.15 lineto
  3884.     1.73  0    lineto
  3885.     1.41 -0.26 lineto
  3886.     1.32 -0.49 lineto
  3887.     1.06 -0.24 lineto
  3888.     1.42  0.18 lineto
  3889.     1.21  0.41 lineto
  3890.     1.11  0.60 lineto
  3891.  
  3892.     0.87  0.57 lineto
  3893.     0.87  0.26 lineto
  3894.     0.99  0.26 lineto
  3895.     1.05  0.12 lineto
  3896.     0.82 -0.07 lineto
  3897.     0.68 -0.07 lineto
  3898.     0.62  0.36 lineto
  3899.     0.26  0.52 lineto
  3900.     0.19  0.48 lineto
  3901.     closepath
  3902.     fill
  3903.   } def
  3904.   end
  3905.  
  3906.   /BuildChar
  3907.   {
  3908.     3 sqrt 3 mul 2 div  3 2 div
  3909.     -1.83 -1.96 2.46 2.1
  3910.     setcachedevice
  3911.     exch begin
  3912.     Encoding exch get
  3913.     CharProcs exch get
  3914.     end
  3915.     exec
  3916.   } def
  3917.   end
  3918.  
  3919.   /Pointsize 2000 Frequency div def
  3920.  
  3921.   /FillFont newfont definefont pop
  3922.   /FillFont findfont Pointsize scalefont setfont
  3923.  
  3924.   /pntsize Pointsize 6 mul 7 div def
  3925.   /HeightDiff Pointsize 2 mul 7 div .49 mul def
  3926.  
  3927.   eoclip newpath
  3928.  
  3929.   currentscreen
  3930.   3 -1 roll
  3931.   pop 120
  3932.   3 1 roll
  3933.   setscreen
  3934.  
  3935.   Bblly pntsize Bbury pntsize add HeightDiff add
  3936.   {
  3937.     Bbllx 1 index moveto
  3938.     {
  3939.       currentpoint
  3940.       1 index exch
  3941.  
  3942.       2 copy 2 copy translate
  3943.       240 rotate
  3944.       
  3945.             SetRandomRGB
  3946.             (b) show
  3947.  
  3948.       0 0 moveto
  3949.       -240 rotate
  3950.       neg exch neg exch translate
  3951.  
  3952.       2 copy translate
  3953.       120 rotate
  3954.       
  3955.             SetRandomRGB
  3956.             (b) show
  3957.       
  3958.             0 0 moveto
  3959.       -120 rotate
  3960.       neg exch neg exch translate
  3961.  
  3962.             SetRandomRGB
  3963.       (b) show
  3964.  
  3965.       currentpoint
  3966.       dup 4 index sub
  3967.       pntsize 2.1 div gt { pntsize sub } if
  3968.       3 -1 roll Bburx gt
  3969.       {pop pop pop exit} if
  3970.       moveto
  3971.     } loop
  3972.   } for
  3973.  
  3974.   LineWidth 0 gt
  3975.   {
  3976.     0 setgray
  3977.     Bblly pntsize Bbury pntsize add
  3978.     {
  3979.       Bbllx 1 index moveto
  3980.       {
  3981.         (a) show
  3982.         currentpoint
  3983.         dup 3 index sub
  3984.         pntsize 2.1 div gt { pntsize sub } if
  3985.         1 index Bburx gt
  3986.         {pop pop pop exit} if
  3987.         moveto
  3988.       } loop
  3989.     } for
  3990.   } if
  3991. } bind def
  3992.  
  3993. %@Fill
  3994. /StainedGlass %StainedGlass,2, Frequency:=15, Lineáwidth:=5
  3995.    {
  3996.    /Linewidth exch 0 100 InRange def
  3997.    /Frequency exch 1 50 InRange def
  3998.  
  3999.      /SetRandomRGB
  4000.      {
  4001.          3    %put 3 randoms number between 0 and 1 on the stack
  4002.          {rand 100 mod 1 add 100 div 1 exch sub}
  4003.          repeat
  4004.         setrgbcolor
  4005.      } def
  4006.  
  4007.    Linewidth Frequency mul 250 div setlinewidth
  4008.    eoclip newpath
  4009.    0 srand
  4010.  
  4011.    currentscreen
  4012.    3 -1 roll
  4013.    pop 100
  4014.    3 1 roll
  4015.    setscreen
  4016.  
  4017.    /dy Bbury Bblly sub def
  4018.    /dx Bburx Bbllx sub def
  4019.    Bbllx Bbury translate
  4020.    250 Frequency div dup scale
  4021.  
  4022.    dy 920 div Frequency mul cvi {
  4023.       0 0 moveto
  4024.       /x0 0 def
  4025.       /y0 0 def
  4026.       /x1 0 def
  4027.       /y1 0 def
  4028.       /x2 0 def
  4029.       /y2 0 def
  4030.       /x3 0 def
  4031.       /y3 0 def
  4032.       0 5 dx 200 div Frequency mul
  4033.          { rand 50 mod 25 div 1 sub add
  4034.          x3 y3 moveto
  4035.          x2 y2 x1 y1 x0 y0 curveto
  4036.          dup rand 30 mod 15 div neg 2 sub
  4037.          2 copy
  4038.          /y0 exch def
  4039.          /x0 exch def
  4040.          lineto
  4041.          dup rand 50 mod 10 div 2.5 sub add rand 50 mod 10 div neg
  4042.          1 index rand 50 mod 10 div
  4043.          4 index rand 30 mod 15 div 2 add
  4044.          6 copy
  4045.          /y3 exch def
  4046.          /x3 exch def
  4047.          /y2 exch def
  4048.          /x2 exch def
  4049.          /y1 exch def
  4050.          /x1 exch def
  4051.          curveto
  4052.          pop
  4053.          closepath
  4054.          
  4055.                  gsave
  4056.                  SetRandomRGB
  4057.                  fill
  4058.          grestore
  4059.  
  4060.          0 setgray stroke
  4061.          } for
  4062.       0 -4 translate
  4063.       } repeat
  4064.    } bind def
  4065.