POV-Ray : Newsgroups : povray.off-topic : PRNG : Re: PRNG Server Time
29 Jul 2024 18:16:26 EDT (-0400)
  Re: PRNG  
From: Orchid XP v8
Date: 22 Jun 2011 16:23:03
Message: <4e024f27$1@news.povray.org>
On 22/06/2011 06:50 PM, Warp wrote:
> Invisible<voi### [at] devnull>  wrote:
>> This is great if you just want to produce a really long stream of random
>> numbers. But are there any PRNGs out there which offer random (!) access
>> to the stream of numbers? In other words, the ability to compute the Nth
>> random number without needing to compute any of the preceding ones?
>
>    You could use a hashing function to convert N to a pseudorandom number,
> and it should work exactly as you describe.

Yeah, that's about what I figured.

You could use a cryptographic hash function, but these usually provide 
strong guarantees about secrecy, etc. which aren't required if you just 
want psuedo-random numbers for simulation purposes. I'm wondering if 
anybody has looked specifically at functions which are cheap to compute 
but still look "reasonably random".

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

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