Advertisement
Guest User

Untitled

a guest
Sep 13th, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %!PS
  2. % Practicing PostScript
  3.  
  4. /s 20 string def
  5.  
  6. /drawArray{
  7.   aload
  8.   pop
  9.   count{
  10.     1 string cvs show
  11.     20 0 rmoveto
  12.   }repeat
  13.  
  14. } bind def
  15.  
  16. /pTree {
  17.   /d exch def
  18.  
  19.   d 1 ge{
  20.     21.6505 -12.5 rlineto
  21.     0 -25 rlineto
  22.  
  23.     d cTree
  24.  
  25.     -21.6505 -12.5 rlineto
  26.     -21.6505 12.5 rlineto
  27.  
  28.     d cTree
  29.  
  30.     0 25 rlineto
  31.     21.6505 12.5 rlineto
  32.   }if
  33. } bind def
  34. /cTree {
  35.   /d exch def
  36.  
  37.   d 1 sub pTree
  38.  
  39.   /d d 1 add def
  40. } bind def
  41.  
  42. % Set background color\
  43. newpath
  44. 0.5 0.5 0.5 setrgbcolor clippath fill
  45.  
  46. 1 1 1 setrgbcolor
  47.  
  48. 300 400 translate
  49.  
  50. newpath
  51. 0 300 moveto
  52.  
  53. 2 setlinewidth
  54.  
  55. /Courier-Bold findfont 20 scalefont setfont
  56.  
  57.  
  58. 3 pTree
  59. -15 -30 rmoveto
  60. [1 1] drawArray
  61.  
  62.  
  63. stroke
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement