%!ps % Modified PostScript fractal fern fernx2.psl % ======= % Copyright c 9/2017 by Don Lancaster & Synergetics, Box 809, Thatcher, AZ, 85552 % (928) 428-4073 Email: don@tinaja.com Website: http://www.tinaja.com % Consulting services available don@tinaja.com or http://www.tinaja.com/info01.html % All commercial rights and all electronic media rights ~fully~ reserved. % Linking usually welcome. Reposting expressly forbidden. Version 2.1 % Send code to Acrobat Distiller, preferably using Windows Command % mode and "//acrodist /F". % Allow 40 seconds or so processing time with default settings. %%%%%%%%%%%%%%%%%%%%%%%% % timing utilities. use stopwatchon and stopwatchoff for simple % one shot timing. For multiple time totals, use resettimer % starttimer stoptimer ... starttimer stoptimer reporttimer /stopwatchoff {stoptimer reporttimer} def % for single shots /stopwatchon {resettimer starttimer} def % for single shots /reporttimer {mytime 1000 div (\rElapsed time: ) print 20 string cvs print ( seconds.\r) print flush} def % to host /resettimer {/mytime 0 def} def % reset timer /starttimer {usertime /mytimenow exch def} def % add to time so far /stoptimer {usertime mytimenow sub /mytime exch mytime add def} def % for multiple timing intervals %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /showbackground true store showbackground { 100 270 moveto 100 630 lineto 320 630 lineto 320 270 lineto closepath gsave 4 setlinewidth 0 0.5 0 setrgbcolor stroke grestore 0.83 1 0.83 setrgbcolor fill } if /problistcreate {mark /counter 0 def probabilities {128 mul round cvi {transforms counter get} repeat /counter counter 1 add def} forall counttomark 128 sub neg dup 0 gt { [1 0 0 1 0 0] repeat} {pop} ifelse] /problist exch def} bind def /doit { stopwatchon problistcreate stopwatchoff problist == stopwatchon 1 1 20 {problist rand -24 bitshift get transform 2 copy moveto 0.001 10 rlineto} repeat newpath stopwatchoff stopwatchon 200 { 1000 {problist rand -24 bitshift get transform 2 copy moveto 0.0001 0 rlineto } repeat stroke } repeat stopwatchoff} bind def % /// demo - remove before use. /// % numdots is now the product of the internal and external loops, as in 250 * 1000. /transforms [ [0 0 0 .16 0 0] [.2 .23 -.26 .22 0 1.6] [-.15 .26 .28 .24 0 .44] [.85 -.04 .04 .85 0 1.6] ] def /probabilities [ .01 .07 .07 .85 ] def 1 setlinecap 0.018 setlinewidth 200 300 translate 30 dup scale 0 0.5 0 setrgbcolor doit showpage % EOF