POV-Ray : Newsgroups : povray.newusers : While in while: help me, please! : Re: While in while: help me, please! Server Time
19 May 2024 17:02:34 EDT (-0400)
  Re: While in while: help me, please!  
From: Jeff Reifel
Date: 21 Jan 2014 13:20:01
Message: <web.52deb9619cd0892411fab0250@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> "LanuHum" <Lan### [at] yandexru> wrote:
> > "Jeff Reifel" <jef### [at] rocketmailcom> wrote:
> >
> > > #declare HairSegment =
> > > sphere {0,0.01 }
> > >
> > > #declare HairStep = 1;
> > > #declare Hair =
> > > union {
> > >     #declare I = 0;
> > >     #while (I < 4) //!!!!!!!!/4 splines in your array!!!!!!!!!!
> > >         union {
> > >             #declare ctr = 0;
> > >             #while (ctr < 1)
> > >                 object { HairSegment texture{pigment{rgb 1}}
> > >                         translate ArrayHairSystem[I](ctr)}
> > >             #declare ctr = ctr + 0.0025;
> > >             #end }
> > > #local I = I + HairStep ;
> > > #end }
> >
> >
> > Thanks! Thank you!
>
> Sorry!
> Now I need to paint a hair.
> 1/3 lengths the black
> 1/3 lengths smooth transition to the white
> 1/3 lengths the white
> That is, it is necessary to include conditions "if"
>
> Help me, please, once again!
> Thanks!

Try something like this:
 pigment{rgb min(1,1.33-ctr*3.7)} finish{diffuse 1 }


Post a reply to this message

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