Article View: comp.lang.postscript
Article #3398Re: Byte's fern postscript program
From: Michael Alan Schuster
Date: Thu, 18 Oct 1990 22:21
Date: Thu, 18 Oct 1990 22:21
55 lines
2221 bytes
2221 bytes
>Has anyone gotten the fern postscript program to run? It was
>published in Byte magazine a few months ago but seems to have
>one or more bugs in it. I would like a copy of it if it has
>been fixed. I recall that someone else posted a question
>similar to this shortly after the issue was on the newsstand,
>so you may want to post it here.
% Title: Fractal fern
% Copyright c 1990 by Don Lancaster and Synergetics, 3860 West First Street,
% Box 809, Thatcher AZ 85552. (602) 428-4073. All commercial rights reserved.
% Personal use permitted so long as this header remains present and intact.
% Show and Tell disk for Apple, Mac, or IBM costs $39.50. Free voice helpline.
% X
%
% This routine create a fractal fern.
% Additional details appear in Don Lancaster's LaserWriter Secrets text.
% Approximate NTX run time: Varies depending on numdot length.
% ....................................
/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
% /// demo - remove before use ///
/numdots 6000 def % increase for denser image; descrease to print faster
/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
200 300 translate
30 dup scale
doit
showpage quit
Technical Details
Message-ID:
<35005@cup.portal.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!apple!portal!cup.portal.com!schusterReferences:
<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!wuarchive!usc!apple!portal!cup.portal.com!schuster From: schuster@cup.portal.com (Michael Alan Schuster) Newsgroups: comp.lang.postscript Subject: Re: Byte's fern postscript program Message-ID: <35005@cup.portal.com> Date: 18 Oct 90 22:21:34 GMT References: <1990Oct18.182149.861@infonode.ingr.com> Distribution: na Organization: The Portal System (TM) Lines: 55