POV-Ray : Newsgroups : povray.advanced-users : Random number generator needed ! : Re: Random number generator needed ! Server Time
30 Jul 2024 02:15:55 EDT (-0400)
  Re: Random number generator needed !  
From: Lutz-Peter Hooge
Date: 22 Feb 2001 11:45:41
Message: <MPG.14ff60ef8ab352fd98969c@news.povray.org>
In article <3a94eb56@news.povray.org>, war### [at] tagpovrayorg says...
>   What I don't understand is how it can return several values. Do you mean
> that if you call it again with MyRand(2,5) it should return a different
> value?
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.

example: 

#declare R1 = random(1,5);   
#declare R2 = random(2,6); 
#declare R3 = random(3,7); 
#declare R4 = random(4,8); 
#declare R5 = random(5,9);

#declare RT = random(1,2);

now the resuling values Rn (n=1...5) should not have a visible link to 
each other (although te input values are obviously linked) and RT = R1.

Lutz-Peter


Post a reply to this message

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