POV-Ray : Newsgroups : povray.advanced-users : Random number generator needed ! : Re: Random number generator needed ! Server Time
29 Jul 2024 18:16:23 EDT (-0400)
  Re: Random number generator needed !  
From: Rune
Date: 20 Feb 2001 17:30:38
Message: <3a92f00e@news.povray.org>
"Lutz-Peter Hooge" wrote:
> Rune wrote:
> > Already tried such things, but the sequence is not at all random.
>
> That depends, of course, on how much random your input variables are.

Well, since rand(seed(X)) is basically a linear function, all the randomness
would have to come 100% from the input. So there's no point in using it
really.

I even tried things like seed(X*1234567*pi), but even then it only repeats a
few numbers over and over again. Guess it's because a linear function of a
linear function is just another linear function...

> if you could somehow feed the output of the macro back to its
> input variables for the next call it would probably be much
> better.

But I can't.

> i didn't find a message explaning why you need this ramdom number
> generator [in the particle system].

There are many reasons. For example I want my particle system to be
frame-independent, so that the even the randomness of the particles is the
same independent on the frame-rate used. I also need it for the cyclic
animation feature where the whole calculation process is basically run
through several times, and where the random numbers must be the same each
time.

I have considered the array solution myself, but it would have to be a very
large array, and it would be a clumsy solution. :(

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 28)
/ Also visit http://www.povrayusers.org


Post a reply to this message

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