|
![](/i/fill.gif) |
Warp <war### [at] tag povray org> wrote:
> geogeo <geo### [at] mecol co uk> wrote:
> > I am using a rand generated value 'n' but the result is always the same. I've
> > put in a text trace to output the value 'n' as follows:
>
> > #declare R1 = seed(1);
> > #declare n = rand(R1);
>
> Well, you specified a seed of 1, and then you pull out a number from the
> RNG stream. Of course you are going to get the next number in the stream
> created with seed(1). That's by design.
>
> > //....//
> > text {
> > ttf "timrom.ttf" str(n,0,3) 0.3, 0
> > pigment { Red }
> > translate<0,2,0>
> > }
>
> Btw, #debug exists for that exact purpose. Much easier to use.
>
> --
> - Warp
Thanks for info on #debug, had not noticed that feature, only been at this a few
days. But how do I get it to output variables? The following #debug fails:
#declare R1 = seed(1);
#declare n = rand(R1);
#debug "rand out = ",str(n),"\n";
thanks
Geo
Post a reply to this message
|
![](/i/fill.gif) |