POV-Ray : Newsgroups : povray.general : for loops : Re: for loops Server Time
5 Aug 2024 14:14:39 EDT (-0400)
  Re: for loops  
From: Micha Riser
Date: 10 Sep 2002 17:53:39
Message: <3d7e69e3@news.povray.org>
Jose Garcia wrote:

> ~
> does Povray support    for loops   , if so, then how?

the only loop structure is while-loops. but as you maybe know you can 
simulate for-loops with while

#declare i = 0;
#while (i<=10);
>                       sphere {
> 
>     <i, 0, 0>, .5                        // I wanted to draw 10 spheres,
> with x starting at 0, going to 10
>     texture {
>       pigment { color Red }
>     }
>   }
>    }
#declare i = i + 1;
#end

- Micha

-- 
objects.povworld.org - The POV-Ray Objects Collection
book.povworld.org    - The POV-Ray Book Project


Post a reply to this message

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