daily pastebin goal
63%
SHARE
TWEET

fern.pl

a guest Jun 7th, 2018 130 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %!PS-Adobe-2.0
  2. %%Creator: B.B.Bantchev
  3. %%BoundingBox: 0 0 596 842
  4. %%Pages: 1
  5.  
  6. % the famous fern leaf after M.F.Barnsley
  7.  
  8. %%Page: 1 1
  9. /x 0 def   /y 0 def   /z 0 def
  10. /a  [
  11.   [   [0 0 0 0]   [0 20 0 0]    [0 0 0 0]]
  12.   [  [85 0 0 0] [0 85 11 70] [0 -10 85 0]]
  13.   [[31 -41 0 0] [10 21 0 21]   [0 0 30 0]]
  14.   [[-29 40 0 0] [10 19 0 56]   [0 0 30 0]]
  15. ]  def
  16.  
  17. /scpr  {
  18.   dup 0 get x mul exch dup 1 get y mul exch dup 2 get z mul
  19.   4 2 roll add add 100 div exch 3 get add
  20. }  bind def
  21.  
  22. /dot  {rad 0 360 arc fill}  bind def
  23.  
  24. /fern  {
  25.   rep_1  {
  26.     rep_2  {
  27.       a   rand 10 mod dup 3 gt {pop 1} if   get
  28.       dup 0 get scpr   exch dup 1 get scpr   exch 2 get scpr
  29.       /z exch def   /y exch def   /x exch def
  30.       z x sub y dot
  31.     }  repeat
  32.   }  repeat
  33. }  bind def
  34.  
  35. /rep_1 300 def
  36. /rep_2 100 def
  37.  
  38. /rad .5 def
  39.  
  40. .283 dup scale
  41.  
  42. .5 setgray
  43. 1400 300 translate 6 dup scale
  44.  
  45. fern
  46.  
  47. %%Trailer
  48. showpage
  49. quit
  50. %%EOF
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top