POV-Ray : Newsgroups : povray.newusers : While in while: help me, please! : Re: While in while: help me, please! Server Time
14 May 2024 15:18:50 EDT (-0400)
  Re: While in while: help me, please!  
From: LanuHum
Date: 22 Jan 2014 12:15:00
Message: <web.52dffbc29cd089247a3e03fe0@news.povray.org>
"Jeff Reifel" <jef### [at] rocketmailcom> wrote:
>
> Try something like this:
>  pigment{rgb min(1,1.33-ctr*3.7)} finish{diffuse 1 }

Thanks.
But, I solved the problem in such a way:

#declare TableLeg =
#declare ctr = 0;
#declare col = 0;
union {
 #while (ctr < 1)
  object { TableLegSegment texture{pigment{rgb col}}rotate z*0
   translate TableLegShape (ctr)
   }
  #declare ctr = ctr + 0.00025;
  #if (ctr > 0.5)
        #declare col = col + 0.0025;
        #end
  #if (ctr > 0.6)
        #declare col = 1;
        #end
 #end
 }
object {
     TableLeg
}


Post a reply to this message

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