POV-Ray : Newsgroups : povray.text.tutorials : Rotating repeating objects : Rotating repeating objects Server Time
18 May 2024 06:49:04 EDT (-0400)
  Rotating repeating objects  
From: Rick
Date: 29 Apr 1999 11:23:20
Message: <37286b58.0@news.povray.org>
I am working on a project that has two grids of items (250 each) that
extend to the horizon in each direction. I would like to tilt the plane of
the objects, or possibly two of the planes but I'm having trouble figuring
out how to do it. Here is the #while/#end loop I'm currently using:

#declare xcount=0;
#while (xcount < 50)
        #declare zcount=0;
        #while (zcount < 50)
                object {UpperRow translate x*xcount + z*zcount}//Ahead
				object {UpperRow translate x*xcount -
z*zcount}//Behind
                object {LowerRow translate x*xcount + z*zcount}
				object {LowerRow translate x*xcount -
z*zcount}
                #declare zcount=zcount+1;
        #end
        #declare xcount=xcount+1;
#end

     So, would the easiest way be to induce some incremental translation
in (for instance) the Y axis, or can I somehow rotate this whole thing as
a group? The latter would be the neatest way because I've run into this
situation before and it's fairly common; it would be nice to just turn the
whole grid as one object (or two, in this case).

     Thanks,

     RA


Post a reply to this message

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