| Issue 25: | Interlacing in parallel mode | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Parallel mode cuts the fractal into contiguous segments of num_frames pixels, and fills them in sequence. This means the fractal is drawn in diagonal bands that gradually become wider. Sometimes due to the parameters this looks like a nice gradual fade, but other times it's annoying.
We should make it do those pixels in the segment in an "interpolative" order, e.g. instead of doing 0, 1, 2, 3, ..., 40 it should do sparse points then the midpoints of them, then the midpoints of those. A power-of-2 scheme makes this easy, in the above example it becomes:
0, 32, 16, 8, 24, 40, 4, 12, 20, 28, 36, ..., 39.
An algorithm for this is:
frame_step = the power-of-2 nearest num_frames
frame = 0
Render(frame)
frame = next_frame
next_frame is:
frame += frame_step*2
if frame >= num_frames:
frame_step >>= 1
frame = frame_step
Nov 17, 2011
Project Member
#1
ejrh00@gmail.com
Nov 17, 2011
It's called a "low-discrepency sequence". See discussion at http://stackoverflow.com/questions/8176743/recursive-interlacing-permutation. |