|
|
I got y = ..........
I remember that I can go on a loop and insert numbers, but I don't
remember how
how do I do a simple for loop?
....in case I didn't use the right name, for (at least on basic) is some
statement that makes a loop
with a value that changes untill it gets equal to another value, and
then the loop ends
Post a reply to this message
|
|
|
|
In article <395933C2.53F66B42@netvision.net.il>, Eitan Tal
<eit### [at] netvisionnetil> wrote:
> I got y = ..........
>
> I remember that I can go on a loop and insert numbers, but I don't
> remember how
> how do I do a simple for loop?
You don't. POV currently only supports #while() loops.
You can do pretty much the same thing this way:
#declare C=0;
#while(C<NUM)
#declare C=C+1;
#end
--
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|
|
|
"Eitan Tal" wrote:
> ....in case I didn't use the right name, for (at least on basic)
> is some statement that makes a loop with a value that changes
> untill it gets equal to another value, and then the loop ends
This should be what you want.
This loop is "safe" becaue it won't go on forever, even if the value cannot
be found.
#declare C = 0;
#declare Max_Loops = 1000000000;
#declare Flag = false;
#while ( Flag=false & C<Max_Loops )
// Insert your stuff here
#if (One_Value=Another_Value)
#declare Flag = true;
#end
#declare C = C+1;
#end
Greetings,
Rune
--
Updated June 12: http://rsj.mobilixnet.dk
3D images, include files, stereograms, tutorials,
The POV Desktop Theme, The POV-Ray Logo Contest,
music, 350+ raytracing jokes, and much more!
Post a reply to this message
|
|