POV-Ray : Newsgroups : povray.advanced-users : Random number generator needed ! : Re: Random number generator needed ! Server Time
30 Jul 2024 00:30:44 EDT (-0400)
  Re: Random number generator needed !  
From: Wlodzimierz ABX Skiba
Date: 26 Feb 2001 04:47:49
Message: <3a9a2645@news.povray.org>
Warp wrote in message <3a965916@news.povray.org>...
> Lutz-Peter Hooge <lpv### [at] gmxde> wrote:
> : No, if I understand Rune correctly, he means if you call it several times
> : with different, but somehow linked to each other, pairs of values, the
> : resulting "random" values should NOT have a visible link to each other.
>
>  And why rand(seed(I1*I2)) doesn't give the desired result? It looks to me
> like it gives values between 0 and 1 quite randomly, not very related to
> I1 and I2.


rand(seed(I1*I2)) gives random results becouse
seed(I1*I2)<>seed(I1*I2) :-)
just test

#warning concat(str(seed(1),0,0),"\n")
#warning concat(str(seed(1),0,0),"\n")
#warning concat(str(seed(1),0,0),"\n")
#warning concat(str(seed(1),0,0),"\n")

what was output ?

0
1
2
3

ABX


Post a reply to this message

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