POV-Ray : Newsgroups : povray.general : while () { while () {}} doesn't work propertly. : Re: while () { while () {}} doesn't work propertly. Server Time
20 Nov 2024 10:24:36 EST (-0500)
  Re: while () { while () {}} doesn't work propertly.  
From: Trevor Quayle
Date: 25 Sep 2001 16:54:41
Message: <3bb0ef11$1@news.povray.org>
you can try using the #debug streaming to watch your variables when you have
problems

-tgq

(see below)



> > > #declare cRed=0
> > > #declare cGreen=0
> > >
> > > #while (cRed < 1)
> > >     #while (cGreen < 1)
> > >         sphere {<cRed*2.5,cGreen*2.5, 0>, 0.2 pigment {color rgb
<cRed,
> > > cGreen, 0>}}
> > >         #declare cGreen=cGreen+0.1

#debug concat("cGreen",str(cGreen,0,1),"\n")
#debug concat("cRed",str(cRed,0,1),"\n")

> > >     #end
> >
> >         #declare cGreen=0  // add this
> >
> > >     #declare cRed=cRed+0.1
> > > #end
> > >


Post a reply to this message

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