Krita PRNG (minor nit)

Matthew Woehlke mw_triad at
Tue Mar 3 23:30:07 CET 2009

Matthew Woehlke wrote:
> Matthew Woehlke wrote:
>> I'm comparing notes now, will see if I can comment on the 'noticeable 
>> pattern' mentioned in r934614; it may be a while before I can look 
>> though as I am doing a full rebuild due to the qt-copy update.
> Strictly looking at the code, I would guess it would help if the input 
> wasn't 'x + y * a' (where 'a' is a relatively small number).

This would help, yes, although it's not enough; the output is still 
noticeably patterned (though the resulting pattern is much more subtle 
than the current implementation and probably not visible on areas less 
than a hundred or so pixels).

Looking at this (without the above change) I noticed something a little 
problematic... while the histogram is noticeably more uniform than what 
my latest iteration produced, there are also visible "dead zones" at 
regular intervals, which means that certain values are systemically 

I'm attaching my updated test code along with a sample histogram 
screenshot that shows the problem. The attached code provides over a 
half dozen algorithm implementations including svn versions 853122 (cos 
algorithm), 934502 and 934614, as well as my latest proposal and various 
previous attempts.

Please do not quote my e-mail address unobfuscated in message bodies.
"Still not King." -- Aragorn
(as quoted in The Very Secret Diaries by Cassandra Claire)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prng-hist-1.png
Type: image/png
Size: 54086 bytes
Desc: not available
Url : 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: noise.cpp

More information about the kimageshop mailing list