POV-Ray : Newsgroups : povray.general : #while loops and staggered offsets ? : #while loops and staggered offsets ? Server Time
16 Nov 2024 01:19:15 EST (-0500)
  #while loops and staggered offsets ?  
From: Ken
Date: 4 Nov 1998 16:50:09
Message: <3640CBD5.70F83EFB@pacbell.net>
Greetings people!

I can creat a 100 object matrix by using a while loop as follows:

#declare x1 =  0;
#while  (x1 < 10)
#declare z1 =  0;
#while  (z1 < 10)
object{Obj translate <x1,0,z1>}
#declare z1 = z1 + 1;
#end
#declare x1 = x1 + 1;
#end

How would I create the same sort of grid where evey other
row in the z direction is offset by 0.5 in the x direction.
My intention is easying the pain of placing shingles on a
roof where it is important that the cracks of overlapping
rows do not line up while back filling the spaces that would
be left by doing so.

Any suggestions ?

Ken Tyler


Post a reply to this message

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