|
|
Am 26.01.2016 um 03:18 schrieb Flynn:
> Today I developed a solution for real random numbers in the Povray-Code.
> Not pseudo random...real random.
>
> The Idea was how to include the time into Povray.
> Now I have always a new picture, when I start a new rendering of it.
>
> OK...if somebody else is also interested on real random numbers...please reply
> to me.
While I hate to be a spoil-sport, I think you might be interested to
hear that POV-Ray 3.7 already has intrinsic support for this, via the
following idiom ;)
#declare RandomSource = seed(now * FACTOR);
where FACTOR is the fraction of a day after which you are guaranteed to
get a new random sequence; e.g. FACTOR=24 gives you a new sequence every
hour, while FACTOR=24*60*60 gives you new values every second. (Larger
values may or may not work as expected, depending on the platform.)
I just noticed that this has been poorly documented though, with the
"now" keyword being only mentioned in the context of the "datetime()"
function.
Post a reply to this message
|
|