POV-Ray : Newsgroups : povray.programming : Seed() Rand() : Re: Seed() Rand() Server Time
29 Jul 2024 08:12:58 EDT (-0400)
  Re: Seed() Rand()  
From: Bjorn Hellqvist
Date: 23 Mar 1998 22:03:36
Message: <35172288.A7743097@stockholm.mail.telia.com>
Bjorn Hellqvist wrote:
> 
> Ok can someone explain how
> Seed() and Rand() works.
> 
> It seems not to work the way i wanted it to work.
> 
> short cuts of the script.
> 
> #declare RndNo=Seed(123)
> 
> #while (foo > 0)
>         #declare Rnd=rand(RndNo)
>         #if (rnd <= 0.1)
>                 //do the stuff
>         #end
>         #if (0.1 < Rnd <= 0.2)
>                 //do some other stuff
>         #end
>         ...
>         ...
> #end
> 
> it seems to goto just one of the if statement.
> 
> /Thanks Bjorn Hellqvist
>         // Sweden


I found the answer myself.. =)


Post a reply to this message

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