# Distance Estimate
See mathr.co.uk/de for a bit about distance estimates for fractals.
The formulas are presented here without much commentary so far.
# 1 Distance Estimate
Given screenspace pixel coordinates, and fractal formula iterates with subscripts indicating derivatives w.r.t. subscripted variable, then the directional components of a distance estimate in pixels are:
Then
# 2 Spatial Derivative Of Distance Estimate
Requires second derivatives of the iterates .
Derivative of magnitude may be useful for colouring effects:
See: https://www.math.univ-toulouse.fr/~cheritat/wiki-draw/index.php/Mandelbrot_set#Variation.
The derivatives of the directional components might possibly have some use too:
# 3 Source
Maxima input was:
X : f(x, y)$
Y : g(x, y)$
dX : X * diff(X, x) + Y * diff(Y, x);
dY : X * diff(X, y) + Y * diff(Y, y);
deX : (X^2 + Y^2) * log(X^2 + Y^2)/2 * dX / (dX^2 + dY^2);
deY : (X^2 + Y^2) * log(X^2 + Y^2)/2 * -dY / (dX^2 + dY^2);
de : radcan(sqrt(deX^2 + deY^2));
diff(de, x);
diff(de, y);
diff(deX, x);
diff(deX, y);
diff(deY, x);
diff(deY, y);Equations above extracted from output wxMaxima document using a shell script:
cat content.xml |
sed "s|<t[^>]*>||g" |
sed "s|</t>||g" |
tr -d " " |
sed "s|'diff(f(x,y),x,1)|X_x|g" |
sed "s|'diff(f(x,y),y,1)|X_y|g" |
sed "s|'diff(g(x,y),x,1)|Y_x|g" |
sed "s|'diff(g(x,y),y,1)|Y_y|g" |
sed "s|'diff(f(x,y),x,2)|X_{xx}|g" |
sed "s|'diff(f(x,y),x,1,y,1)|X_{xy}|g" |
sed "s|'diff(f(x,y),y,2)|X_{yy}|g" |
sed "s|'diff(g(x,y),x,2)|Y_{xx}|g" |
sed "s|'diff(g(x,y),x,1,y,1)|Y_{xy}|g" |
sed "s|'diff(g(x,y),y,2)|Y_{yy}|g" |
sed "s|f(x,y)|X|g" |
sed "s|g(x,y)|Y|g" |
sed "s|\([+*/-]\)| \1 |g" |
sed "s| [*] | |g" |
sed "s|log|\\\\log|g" |
sed "s|sqrt|\\\\sqrt|g"