|
|
Alain <aze### [at] qwertyorg> wrote:
> >
> > I am trying to randomise a texure in a while-loop.Is this possible,and how can I
> > achive this please.
> >
> >
> First, you initiate a random stream: #declare Rand = seed(0);
> seed() takes any integer value as it's argument.
>
> Then, in your loop, you use that stream to randomly create some pigment
> or switch between patterns and create random colour_map, also using your
> random stream.
>
> You can create a stream to sellect your pattern and another for the colours.
> You can create a random pigment like this:
> pigment{rgb<rand(Rand),rand(Rand),rand(Rand)>}
> pigment{rgbft<rand(Rand),rand(Rand),rand(Rand),rand(Rand)/2,rand(Rand)/2>}
> will generate pigments that are transparent to various degrees.
>
> You can use the #switch() #case()/#range() #break #end statement to
> sellect between various patterns. Read the documentation about the
> #switch() statement. The #break is mandatory.
>
>
> Alain
Thankyou for your reply, but still no success. Here is my code.
#declare Rand = seed(1);
#declare Count = 0;
#while (Count <10)
object{My_Column translate-x*12
// texture {My_Marble rotate <rand(Rand),rand(Rand),rand(Rand)>}
*Count rotate - 100*y
}
#declare Count=Count+1;
#end
All works untill I add the texture line, then this error:No matching } in
object',: found instead. What am I doing wrong,please.
Post a reply to this message
|
|