Title: Incremental 2D Sobol based point set Post by: Roquen on October 11, 2013, 11:04:09 AM Quick hack in a moment of work avoidance. Hammersley point set like 2D LDS using Sobol for one coordinate, computed incrementally. Mimimally verified, written in Java with notes for C/C++. The scrabbling isn't very good, but the computation is constant time instead of log(n)
Code: @SuppressWarnings("boxing")Title: Re: Incremental 2D Sobol based point set Post by: Roquen on October 14, 2013, 11:25:26 AM Some info I skipped on the first time. The scrambling is questionable and I haven't run any stats test to check the impact and my Z2 knowledge isn't good enough at the theoretic level to have a feel for it. The advantage of the above method is that it's about as fast as you can get. It's also going to have a low star-discrepancy. The pixar paper I mentioned in the other thread is here: Correlated Multi-Jittered Sampling (http://graphics.pixar.com/library/MultiJitteredSampling/) (As an aside the ad-hoc "squaring" domain mapping of the m-set that I tossed out here (http://www.fractalforums.com/fragmentarium/fractal-plus-change-of-domain-mashup/msg65054/#msg65054) is mentioned in Figure 10)
The big downside of the above (and all Hammersley like sets) is that you have to decide in advance how many points you're going to use for a given computation (pixel, area, whatever) and cannot progressively add more. Also to translating the above to GLSL requires 'findLSB'. Title: Re: Incremental 2D Sobol based point set Post by: Roquen on October 15, 2013, 11:09:56 PM In yet another attempt at work avoidance I dug up a progressive version...aka one where you can keep adding points until you're happy. This time in C. One other gotcha I forgot to mention is that neither this version nor the last deal properly with the index wrapping back to 0. This also has a seek method which can be easily adapted to the point set version above.
Code: #include <stdint.h> Title: Re: Incremental 2D Sobol based point set Post by: Roquen on October 16, 2013, 10:50:51 AM But hey! This is the programming sub-fourm! Seriously this is in response to Alef's request for a Sobol reference and knightly's testing of buddhabrot rendering using a Halton sequence.
Title: Re: Incremental 2D Sobol based point set Post by: eiffie on October 17, 2013, 06:57:06 PM I'm thankful for the code! It is true tho that a few examples would spark more interest. Sometimes people can only see the use of things when they SEE it.
Title: Re: Incremental 2D Sobol based point set Post by: Roquen on October 18, 2013, 09:55:05 AM I know...I'm rather hoping someone else will use it and provide a demonstration. ;)
Title: Re: Incremental 2D Sobol based point set Post by: Alef on October 26, 2013, 03:52:03 PM Nice, epecialy progressive.
You 'll see something only if you 'll put it in engine in place of random numbers. Throught in wikipedia there is some pictures showing smoother distribution if compared with random sequences. Title: Re: Incremental 2D Sobol based point set Post by: Roquen on March 28, 2014, 10:15:39 PM Tossed a full implementation (java..for C/C++ porting see notes above) of both flavors here: https://github.com/roquendm/JGO-Grabbag/tree/master/src/roquen/math/lds |