POV-Ray : Newsgroups : povray.general : A quick rand() question... : Re: A quick rand() question... Server Time
31 Jul 2024 04:18:13 EDT (-0400)
  Re: A quick rand() question...  
From: Jan Dvorak
Date: 22 Oct 2007 14:31:17
Message: <471cec75$1@news.povray.org>
Tim Nikias napsal(a):
> Hey all!
> 
> I know the rand()-Stream ist just pseudo-random, not purely random. I 
> use the same seed-Value, I get the same order of random-values between 0 
> and 1, so far, so good.
> 
> What's with different OS'? I've got a WinXP-PC and recently also got a 
> MacBook Pro (Intel Based). Since POV-Ray doesn't run natively on 
> Intel-Based MacBooks (yet), I'm using MegaPOV to have something running 
> there. ;-) Of course, since it's MegaPOV, the random-stream might be 
> different again, but if/once the Intel-Based POV-Ray for Mac gets 
> released, will the streams be identical?
> 
> You may argue that this question is purely scientific, when I use random 
> streams, I'm looking for random-input, so asking how determined it is 
> might be kinda stupid... Anyways, I figured I'd just ask. Gotta keep 
> this random-stuff in mind when designing/writing my next images.
> 
> Point is: Once there's a new POV-Ray, or you switch to a different OS, 
> the image might change, and when it's about re-rendering the same 
> image... I might have to implement my own, SDL-based random thingy, 
> that'd be a trick to be sure the stuff I want random ("but not really 
> random") is more or less determined...
> 
> Ah, sorry, I'm beginning to babble, I'll stop here. Back to the 
> question: How determined are the random-streams when talking cross-OS?
> 
> Regards,
> Tim
> 
It's not a bad question at all. There are multiple streams for the 
purpose that you can change a part of the scene without changing any 
random values further down the code so I guess the generator is 
cross-platform also.
What I'd like to see is a stream that generates new values for each new 
render. I have not succeeded using start_chrono as the seed.


Post a reply to this message

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