POV-Ray : Newsgroups : povray.newusers : seed and rand : Re: seed and rand Server Time
30 Jul 2024 04:14:20 EDT (-0400)
  Re: seed and rand  
From: Slime
Date: 9 Oct 2004 13:20:53
Message: <41681df5$1@news.povray.org>
> Can anyone tell me why I have not the same result when I put the seed in
the
> beginning of the code or just before using the stream ?

The fact that you consider *not* putting the seed before the calls to rand()
makes me think you're using it wrong. I have never experienced the behavior
you're describing.

Are you doing it like this?

#declare mySeed = seed(123);

...

#declare randomNumber = rand(mySeed);

The important thing here is that you pass the seed variable into the rand
function.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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