3 ms·
My approach would be something like this, but with a very "poor" generator with the parameters a=81007, c=0 and m=2^17. This approximates a low discrepancy sequ
by leni536 9y ago
My approach would be something like this, but with a very "poor" generator with the parameters a=81007, c=0 and m=2^17. This approximates a low discrepancy sequence (additive recurrence with alpha=1/golden ratio). Then I would calculate x and y values using the hilbert curve and the calculated pseudorandom number as the index (more precisely two Hilbert curves next to each other, so it covers a 512x256 rectangle). On today's CPUs it can be calculated quite fast (shameless selfplug: https://github.com/leni536/fast_hilbert_curve https://github.com/leni536/fast_hilbert_curve). I suspect that the resulting pattern on the screen would be less random looking, but more uniform without any obvious pattern.
- schindlabua 9y agoCool! I was just looking up hilbert implementations yesterday, so that's super useful. Thanks! (quick note: in your source the function is called hilebert instead of hilbert)
- leni536 9y agoFixed, I also added a Wolfram Mathematica module that can be used with LibraryFunctionLoad.