POV-Ray : Newsgroups : povray.newusers : rand not producing random! : Re: rand not producing random! Server Time
8 Jul 2024 02:46:43 EDT (-0400)
  Re: rand not producing random!  
From: Stephen
Date: 6 Jan 2010 17:00:05
Message: <4b4507e5$1@news.povray.org>
geogeo 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);
> 
> //....//
> text {
>     ttf "timrom.ttf" str(n,0,3) 0.3, 0
>     pigment { Red }
>     translate<0,2,0>
>   }
> 
> With the above seed the result is alwways 0.422. What am I missing here?
> 

What you get with rand is a series of random numbers. Using the same 
seed the series is always the same.


-- 

Best Regards,
	Stephen


Post a reply to this message

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