POV-Ray : Newsgroups : povray.general : rand() / seed() Server Time
16 Nov 2024 07:14:49 EST (-0500)
  rand() / seed() (Message 1 to 2 of 2)  
From: Ken
Subject: rand() / seed()
Date: 9 Oct 1998 06:44:12
Message: <361DDACB.BD76407A@pacbell.net>
Greetings !

When specifying a seed value for the rand function what determines
the effectiveness of the number chosen ? I recently read you can pop
in any number, since the rand function will handle the distribution,
but certainly one number to the next is going to effect the outcome
differently ( or ?).

Thanks !

Ken Tyler


Post a reply to this message

From: Marc Schimmler
Subject: Re: rand() / seed()
Date: 9 Oct 1998 07:17:07
Message: <361DE2A0.446B@ica.uni-stuttgart.de>
The seed is used to determine the starting point for the random function
at the so called random generator. This chip contains a large amount of
numbers which are accessed by the rand() function. Even changing the
seed value by one should give you a completly new set of "random"
numbers, but you should get these numbers again if you use this seed
value again. If don't want this repetion you could try (I don't know if
this can be done in povray!) to use for example the system time as seed
value.

I hope this answered your question.


Greetings

Marc

-- 
Marc Schimmler
Institut fuer Computeranwendungen
Universitaet Stuttgart


Post a reply to this message

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