POV-Ray : Newsgroups : povray.advanced-users : Random number generator needed ! : Re: Random number generator needed ! Server Time
30 Jul 2024 02:24:49 EDT (-0400)
  Re: Random number generator needed !  
From: Geoff Wedig
Date: 22 Feb 2001 08:03:39
Message: <3a950e2a@news.povray.org>
Rune <run### [at] inamecom> wrote:

>>   For this rand(seed(VAL)) works quite well. It returns a value from
>> 0 to 1 which is seemingly not related to VAL.

> Yes if wanted just a single random value - but I need dozens of them!
> Not only should the random number have no visible connection to VAL. It
> should also have no visible connection to the other random numbers. I didn't
> explicitly say that, as I thought it was needless to say.

Ok, so you want a random stream created based on two numbers, but one that
doesn't show obvious connection to the strems based on any other two
numbers.

In other words, you can't just use something like:

#macro MyRand(v1,v2)

  seed(v1*19873+v2)
#end

because while it gives a seed value for each pair, and you've got a stream,
it is a stream which is not random when compared to a stream with two other
inputs?  Ie, you need multiple random streams that are also random with
regards to each other.

Is that correct?

Geoff


Post a reply to this message

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