Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #835
| From | luser- -droog <mijoryx@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.postscript |
| Subject | Re: Sunflower Spiral . . . Re: L-systems in PS |
| Date | 2012-07-28 20:41 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <87b4f57f-cfcf-42e8-bf01-d4cb85baf1d1@googlegroups.com> (permalink) |
| References | <46b6f8cb-cab9-4ac2-bb4c-165771b1c2e7@googlegroups.com> <7097aa29-1abb-4713-a144-4e934ff62b58@googlegroups.com> <19a58f63-fe19-46fa-9e28-6cc94f75bc53@googlegroups.com> <6e4a916b-81af-4a9b-9b80-3522566c32df@googlegroups.com> <16er35fqyjie$.z72aiwdgmksl$.dlg@40tude.net> |
On Saturday, July 28, 2012 8:59:54 PM UTC-5, tlvp wrote:
> On Sat, 28 Jul 2012 14:13:16 -0700 (PDT), luser- -droog wrote:
>
>
>
> > ... So parameters evaluate to numbers and then
>
> > just occur in the arrays and get used
>
> > where needed. ...
>
>
>
> In my book, the terms parameter, index, and (numerical) variable have
>
> always been pretty much interchangeable :-) . HTH. Cheers, -- tlvp
>
Well, yeah. It isn't radically different in that respect.
But it does mean that the productions need to be partially
evaluated at each step. In other cases, the parameter may
select among several productions, as well as evaluate in
the selected procedure.
It turns out I didn't implement the brackets correctly
in that last one, so here's the fixup.
563(1)10:39 PM:lsys 0> cat sunf.ps
%!
%Sunflower Spiral
%From ABOP Section 4.1
<<
/a 137.5
/A {
/n exch def
[ a /+ cvx /[ cvx n .5 exp /f cvx /D cvx /] cvx n 1 add /A cvx ] cvx
}
/DOL {
{
[ exch {
currentdict exch 2 copy known {
get exec aload pop
}{
exch pop
} ifelse
} forall ]
} repeat cvx
}
/Dexec {
{
dup type /arraytype eq {
Dexec
}{
exec
} ifelse
} forall
}
>>begin
/graphics <<
([) { gsave }
(]) { grestore }
/F { 0 rlineto }
/f { 0 rmoveto }
/+ { rotate }
/- { neg rotate }
/r .5
/innercolor { .5 setgray }
/D { gsave
currentpoint r 0 rmoveto
r 0 360 arc
gsave innercolor fill grestore
stroke
grestore }
>> def
{ 0 A } 1000 DOL
300 400 translate
0 0 moveto
1 10 dup dup scale
div setlinewidth
graphics begin
Dexec clear
end
showpage
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
L-systems in PS luser- -droog <mijoryx@yahoo.com> - 2012-07-25 23:34 -0700
Pastel Forests . . . Re: L-systems in PS luser- -droog <mijoryx@yahoo.com> - 2012-07-27 10:05 -0700
Stochastic Weeds . . . Re: L-systems in PS luser- -droog <mijoryx@yahoo.com> - 2012-07-28 01:21 -0700
Sunflower Spiral . . . Re: L-systems in PS luser- -droog <mijoryx@yahoo.com> - 2012-07-28 14:13 -0700
Re: Sunflower Spiral . . . Re: L-systems in PS tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2012-07-28 21:59 -0400
Re: Sunflower Spiral . . . Re: L-systems in PS luser- -droog <mijoryx@yahoo.com> - 2012-07-28 20:41 -0700
Fancy Dingbats. . . Re: L-systems in PS luser- -droog <mijoryx@yahoo.com> - 2012-07-29 22:54 -0700
Hilbert Space-Curve, Re: L-systems in PS luser- -droog <mijoryx@yahoo.com> - 2012-09-20 23:35 -0700
csiph-web