home *** CD-ROM | disk | FTP | other *** search
/ Corel Draw 3 / CorelDRAW-v3.0.iso / draw / userproc.txt < prev    next >
Text File  |  1992-10-25  |  80KB  |  3,282 lines

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