|
 |
hi,
"David Kraics" <bar### [at] aol com> wrote:
> "Bald Eagle" <cre### [at] netscape net> wrote:
> > ...
> > #declare Ymin = min_extent (Object).y;
> > #declare Ymax = max_extent (Object).y;
> > #declare Height = Ymax-Ymin;
> >
> > #for (Level, 0, 5)
> > object {Object translate y*Level*Height}
> > #end
> >
> > (untested code)
>
> So lets say the height of the object is .803, The object is called Floor, and I
> want to stack 66 of them. Could you reshow the code with the inputs I gave, I'm
> trying to understand this
see the documentatino for the '#for'; essentially, the value of 'Level' (think
"storey") increases, with each iteration of "the body", by one in this case. so
the 'translate' calculates the cumulative heights at which the "Floor" begins;
simply replace 'Height' wit hyour value, and change the end value in the '#for'
to '65' (ie, from 0 to 65 == 66 values/"Floors")
<https://wiki.povray.org/content/Reference:Conditional_Directives#The_for_Directive>
regards, jr.
Post a reply to this message
|
 |