🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #3391

Re: Byte's fern postscript program

#3391
From: Taed Nelson
Date: Thu, 18 Oct 1990 20:45
44 lines
2078 bytes
This is the same code as from Byte, except that I made it larger,
  centered it on the page, and added many more points.  By the way,
  I found no "bugs" -- this is typed exactly (except indenting).

--------------------

%!
/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 {
        problistcreate 1 1 20 {
                problist rand -24 bitshift get transform 2 copy
                moveto 0.001 10 rlineto
        }
        repeat newpath numdots {
                problist rand -24 bitshift get transform 2 copy
                moveto 0.001 0 rlineto stroke
        }
        repeat
}
bind def

/numdots 600000 def
/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 setlinewidth 300 0 translate 100 75 scale doit showpage quit
Technical Details
Message-ID: <1990Oct18.204534.9186@julius.cs.uiuc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!samsung!know!sdd.hp.com!usc!julius.cs.uiuc.edu!melodian.cs.uiuc.edu!nelson
References: <1990Oct18.182149.861@infonode.ingr.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!samsung!know!sdd.hp.com!usc!julius.cs.uiuc.edu!melodian.cs.uiuc.edu!nelson
From: nelson@melodian.cs.uiuc.edu (Taed Nelson)
Newsgroups: comp.lang.postscript
Subject: Re: Byte's fern postscript program
Message-ID: <1990Oct18.204534.9186@julius.cs.uiuc.edu>
Date: 18 Oct 90 20:45:34 GMT
References: <1990Oct18.182149.861@infonode.ingr.com>
Sender: news@julius.cs.uiuc.edu (USENet News)
Reply-To: nelson@melodian.cs.uiuc.edu (Taed Nelson)
Distribution: na
Organization: Picasso Group, University of Illinois at Urbana-Champaign
Lines: 44