POV-Ray : Newsgroups : povray.newusers : rand not producing random! : Re: rand not producing random! Server Time
6 Oct 2024 01:44:19 EDT (-0400)
  Re: rand not producing random!  
From: Jim Holsenback
Date: 10 Jan 2010 13:09:59
Message: <4b4a17f7@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote in message 
news:web.4b48e504cc0023fa65f302820@news.povray.org...
> I remember that the concept of using seed() and rand() was a bit difficult 
> to
> grasp when I started out with POV-Ray (there is no real 'how-to' in the
> documentation.)
>
> Here's a simple example:
>
> #declare R1 = seed(27);
>
> pigment{color rgb <rand(R1),rand(R1),rand(R1)>}
>
> Each rand is a different value--but those three different values will 
> always be
> the 'same', since they use the same seed() value. Change seed() and you 
> get
> three *new* and different rand() values.

After reading carefully this example in seems to be saying the same thing:

http://wiki.povray.org/content/Documentation:Reference_Section_2#Functions

I also started a talk page:

http://wiki.povray.org/content/Documentation_Talk:Reference_Section_2

Just in case you might think it could be better worded!

Jim


Post a reply to this message

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