PRNG proposal
    Matthew Woehlke 
    mw_triad at users.sourceforge.net
       
    Wed Dec 24 02:38:56 CET 2008
    
    
  
Moritz Moeller wrote:
> Sorry for the blunt comment and I might be missing something obvious
> here, but: why not just use something proven and fast like mersenne
> twister? :)
No worries, it's a legitamite question. I actually looked at it briefly, 
but AFAICT it's an iterative generator with no obvious way to make it 
procedural (and I'm also not sure how fast it is). Krita needs a 
procedural PRNG, that is prng(x, y, seed) must always give the same 
result for the same values of x, y, seed, and must also generate results 
over a region (x, y changing, seed constant) that both provides a 
reasonable distribution and is free of obvious visual artifacts. (I 
guess that qualifies as "something obvious"? ;-) )
If we needed an iterative PRNG I'd be advocating plain old *rand48 
(which is actually permuteWhole from my algorithm), as it's extremely 
simple, and generally adequate for moderate-quality PRNG, which I think 
is all we need. Mersenne Twister, to my understanding, is a 
higher-quality PRNG that is possibly overkill :-).
-- 
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
-- 
このテキストを翻訳する時間の無駄だばかばかしい
    
    
More information about the kimageshop
mailing list