POV-Ray : Newsgroups : povray.newusers : Re: Infinate cylinders : Re: Infinate cylinders Server Time
29 Jul 2024 12:29:45 EDT (-0400)
  Re: Infinate cylinders  
From: Thorsten Froehlich
Date: 20 Jul 1999 03:41:09
Message: <37942815@news.povray.org>
In article <3793B451.295DB2FE@hotmail.com> , our### [at] hotmailcom  wrote:

> "shapes.inc" defines a cylinder of infinite length that runs along the
> X axis as:
>
> #declare Cylinder_X =
>  quadric
>   {<0, 1, 1>,
>    <0, 0, 0>,
>    <0, 0, 0>, -1
>   }
>
> Is there some similar way to generate an infinite 2D array of these
> cylinders along with some way to either control their spacing or
> diameter?

Yes, using the #while...#end Directive:

#declare CountZ=0;
#while (CountZ < 5)
  #declare CountY=0;
  #while (CountY < 5)
    object{Cylinder_X translate <0, CountY*3, CountZ*3>}
    #declare CountY=CountY+1;
  #end
  #declare CountZ=CountZ+1;
#end


    Thorsten


PS: The group povray.programming is for discussing the POV-Ray source code,
not scene creation problems. I have cross-posted this to povray.newusers.


Post a reply to this message

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