I have a really underpowered platform here and want to draw a Julia (and possibly Mandelbrot and Burning ship) fractals using a 8.24 fixed point class. I use iteration count for coloring and need to speed up rendering considerably. I read about perturbation theory (see this) and am trying to do the following:
- Iteratively calculate one image pixel $X$ using $X_{n+1}=X_n+X_0$ until the iteration exits due to iteration limit or distance estimate ($|X_n| >= 2$). I calculate and store all values of $X_n$, $A_n$, $B_n$, $C_n$ on the way.
- Then for the next 3 pixels I use $\Delta_n = A_n\delta_i+B_n\delta_i²+C_n\delta_i³$, where $\delta_i = pixel\space index *{horizontal\space range \over nrOfPixels}$ (the "horizontal step value"). Then supposedly the (estimated) value for the new pixel should be $Y_n = X_n + \Delta_n$. This is where the speedup should come from.
- Then I use $Y_n$ and decide whether to iterate further if $|Y_n| < 2$, or if $|Y_n| >= 2$ "step backwards" (calculate $Y_{n-1}$ like above), to see if $Y_n$ would have exited in an earlier iteration (until $|Y_{n-1}| < 2$).
This should make the 3 pixels "I cheat on" much cheaper to calculate (if this works I'd use 4x4 pixel chunks). Question is: Should this work in theory? It is not really working for me and I'm trying to find out what I'm doing wrong. "Regular" per-pixel Julia rendering is working ok for 16.16 and 8.24 fixed-point formats, so I suspect it's not calculation errors piling up... I can post C++ code if that helps.