POV-Ray : Newsgroups : povray.newusers : seed and rand : Re: seed and rand Server Time
30 Jul 2024 04:13:15 EDT (-0400)
  Re: seed and rand  
From: Christopher James Huff
Date: 14 Oct 2004 19:24:42
Message: <cjameshuff-E5889F.19242214102004@news.povray.org>
In article <web.41684a61124fa141ed8cdc490@news.povray.org>,
 "regdo" <reg### [at] wanadoofr> wrote:

> i get an x that is equal to a fixed value whatever I pass as a parameter if
> the second seed() statement.
> If I move it just before I use it, it works fine. That is what I don't
> understand, because I thought that random number streams were totally
> independant.

You are doing something wrong, either with the streams or with the 
random numbers, or with your interpretation of the results. The rand() 
and seed() functions do operate as the documentation describes, and 
multiple streams work just fine. I often use multiple independent 
streams when using several randomly generated objects in a scene...you 
can change one to use a different seed, and get a different randomly 
generated object, without affecting the others. It's especially useful 
in plant generators where not all seeds produce a good looking result.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

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