POV-Ray : Newsgroups : povray.general : stacking formula : Re: stacking formula Server Time
26 Apr 2024 01:40:44 EDT (-0400)
  Re: stacking formula  
From: David Kraics
Date: 1 Jan 2023 09:25:00
Message: <web.63b1978954dbdfbe1c1b6180a57e0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "David Kraics" <bar### [at] aolcom> wrote:
>
> > Is there some kind of loop I can use to do this for me, and maybe return a value
> > so I can add new things on top of the stack?
>
> Of course.
>
> Your level has a ymin and a ymax.  ymax-ymin equals your height.
> do a loop, instantiate your object, and then translate each subsequent object in
> the y direction by the incremented height.
>
> #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)
>
>
> - Bill

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


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.