|
|
>...oh, I forgot the name... but anyway, it would allow
>things like this:
>
>Instead of
>
>#declare i=i+1;
>
>we could have
>
>#declare i++;
The ++ is called the increment operator.
The -- is called the decrement operator.
I don't see a burning need for these since they just add or subtract
one from the variable.
There may be a use for *= and other compound operators, but still the
long version of what these accomplish gets the job done.
Regarding the for() loop, I usually just use this as an incrementing
loop anyhow which can be accomplished with the while loop by adding
an incrementer at the end. ie:
(I pulled this out of one of my objects)
#declare GX = 0;
#declare GR = 0;
#while (GX < 20)
union{
cylinder {<0,.065,0>,
<0,0.03,0>,
0.01475
}
superellipsoid{ <.1,.1>
scale<.0007,.0175,.017>
rotate y*GR
translate<0,.0475,0>
}
texture{Chrome}
}
#declare GX = GX + 1;
#declare GR = GR + 18;
#end
--
...coffee?...yes please! extra sugar,extra cream...Thank you.
Post a reply to this message
|
|