### burning ship distance estimation

• 14 Replies
• 700 Views

0 Members and 1 Guest are viewing this topic.

• 3f
• Posts: 1232

#### burning ship distance estimation

« on: December 25, 2017, 11:02:24 PM »
burning ship distance estimation

https://fractalforums.org/index.php?action=gallery;sa=view;id=228

Burning Ship rendered with distance estimation. For the derivative I just used D := 2 Z D + 1 same as Mandelbrot, seems to work though may not be truly correct (possibly need 2x2 Jacobian matrices for the non-conformal formulas).

Render time 17m30s at 3840x2160, 356refs, ignore small glitches enabled.  See original file's JPEG comment for coordinates etc.

Rendered with (work in progress) KF 2.13...

• 3f
• Posts: 1811

#### Re: burning ship distance estimation

« Reply #1 on: December 26, 2017, 11:45:41 PM »
Looking forward to 2.13!

Not sure if it's worth it to get correct DE for the other fractals, but it's possible. Assume the iteration is $$u \leftarrow f(u,c)$$
with u and c now real 2-vectors (any dimension actually) and f a vector function, and it has an escape radius, in particular
$$lim_{|u|\rightarrow \infty} |f(u,c)| = |u|^q$$ for some $$q>1$$ with "||" the Euclidean vector norm (length).

In that case the DE is
$$DE = |u|log|u|/|\nabla |u||$$ with $$\nabla |u|$$ the gradient vector of partial derivatives wrt c of |u|.

For non-analytic functions the derivative of the norm is not the same as the norm of the derivative and if you work it out you get
(Correction)$$|\nabla|u|| = |u . J|/|u|$$ with u a row vector and J the Jacobian (matrix of partial derivatives of the u):
$$J_{ij} = \partial u_i/\partial c_j$$ with i labeling the rows. So you'd have to iterate these.

The DE can also be written in terms of the continuous escape time m,
$$m = N+1-\log(\log(|u_N|)/\log(q)$$,
$$DE = (\log(q) |\nabla m|)^{-1}$$
which you can use for the numerical DE.
« Last Edit: December 27, 2017, 01:11:47 AM by gerrit »

• 3f
• Posts: 1232

#### Re: burning ship distance estimation

« Reply #2 on: December 27, 2017, 12:09:49 AM »
Quote from: gerrit
For non-analytic functions the derivative of the norm is not the same as the norm of the derivative
Ah! That's probably why my (since deleted, no backup saved) attempt at partial derivative matrices failed (the incorrect complex formula looked better).

Is the u in the following the final value that escaped?  $|\nabla|u||=|u.J|/|u|$

A worked example might help me a lot, I get confused with the order things should be in in matrices...
« Last Edit: December 28, 2017, 01:10:36 PM by claude, Reason: correction to avoid confusion »

• 3f
• Posts: 1811

#### Re: burning ship distance estimation

« Reply #3 on: December 27, 2017, 01:19:13 AM »
Ah! That's probably why my (since deleted, no backup saved) attempt at partial derivative matrices failed (the incorrect complex formula looked better).

Is the u in the following the final value that escaped?  $DE=|u.J|/|u|$

A worked example might help me a lot, I get confused with the order things should be in in matrices...
Sorry I made a typ0, that is the dervative of the norm of the grad, to be substituted in the DE formula. Corrected my post:
$|\nabla |u||=|u.J|/|u|$
Yes u is the value at escape time, explicitly writing $$u = (u_1,u_2)$$
$|\nabla |u||=|v|/|u|$ with v the vector with components
$$v_j = \sum_{i=1}^{2} u_i J_{ij}$$, where J defined in my prev. post.

• 3f
• Posts: 1232

#### Re: burning ship distance estimation

« Reply #4 on: December 28, 2017, 01:04:37 PM »
I derived the derivatives at https://fractalforums.org/fractal-mathematics-and-new-theories/28/perturbation-theory/487/msg3226#msg3226

Which makes
$u = \begin{pmatrix} X & Y \end{pmatrix} \\ J = \begin{pmatrix} \frac{\partial X}{\partial A} & \frac{\partial X}{\partial B} \\ \frac{\partial Y}{\partial A} & \frac{\partial Y}{\partial B} \end{pmatrix} \\ DE = \frac{|u|^2 \log |u|}{|u . J|}$

#### knighty

• Fractal Feline
• Posts: 193

#### Re: burning ship distance estimation

« Reply #5 on: December 28, 2017, 02:46:22 PM »
Or:

$DE = \frac{|u| \log |u|}{||J||}$

Any norm of J should be fine but the best would be euclidean (max singular value) or Forbenius. It is maybe even possible to get an ellipse like distance.

• 3f
• Posts: 1232

#### Re: burning ship distance estimation

« Reply #6 on: December 28, 2017, 03:02:34 PM »
Any norm of J should be fine
Seems not, because I tried it and it looked bad.  I think it is because
Quote from: gerrit
the derivative of the norm is not the same as the norm of the derivative
Should hopefully have some pictures with gerrit's formula shortly...

• 3f
• Posts: 1232

#### Re: burning ship distance estimation

« Reply #7 on: December 28, 2017, 04:48:15 PM »
Here's one rendered with gerrit's |u.J|/|u| formula.  In general, there's no breakage with too-light regions like the ||J|| formula, and it seems less conservative than the complex variant which had some darker regions.  Looking good.

• 3f
• Posts: 1811

#### Re: burning ship distance estimation

« Reply #8 on: December 28, 2017, 10:12:37 PM »
Or:

$DE = \frac{|u| \log |u|}{||J||}$

Any norm of J should be fine but the best would be euclidean (max singular value) or Forbenius. It is maybe even possible to get an ellipse like distance.
Yes, the definition of DE is not unique, the one I gave is simply the Euclidean length of the shortest vector v that solves G(c+v)=0 in linear approximation (small v) with G the potential function $$G(c) = e^{-m \log q}$$.

Probably for compatibility best to use this in the application at hand as the 2.12 numerical DE has that right now.

• 3f
• Posts: 1232

#### Re: burning ship distance estimation

« Reply #9 on: December 29, 2017, 12:13:27 AM »
attached is made with a Haskell program that compiles to C.  fully automatic, the input (as a Haskell expression, no parser yet) was:
Code: [Select]
burning_ship (R2 a b) (R2 x y) = R2 (x^2 - y^2 + a) (2 * abs (x * y) + b)no code generation for perturbation rendering yet, but it's on the todo list, as is an expression parser

#### knighty

• Fractal Feline
• Posts: 193

#### Re: burning ship distance estimation

« Reply #10 on: December 29, 2017, 02:53:10 PM »
Well, using the euclidean norm of the jacobian is the most concervative so the rendering should look much darker especially around smooth featurless areas of the burning ship. All the DE's formula, in the context of coloring, can be multiplied by some factor to change the degree darkness.
Claude, do you have a rendering with the ||J|| based formula?

• 3f
• Posts: 1232

#### Re: burning ship distance estimation

« Reply #11 on: December 30, 2017, 09:42:57 PM »
Quote from: knighty
Claude, do you have a rendering with the ||J|| based formula?
No, I didn't save one.  But there may have been some other bugs in the code that caused the badness...

• 3f
• Posts: 1232

#### Re: burning ship distance estimation

« Reply #12 on: January 06, 2018, 04:25:10 AM »

• 3f
• Posts: 1811

#### Re: burning ship distance estimation

« Reply #13 on: January 06, 2018, 04:57:14 AM »
A bit scary, but very cool. Hope automatic soundtrack generation will be one of the new features in KF 2.13

• 3f
• Posts: 1232

#### Re: burning ship distance estimation

« Reply #14 on: September 11, 2019, 07:44:43 PM »
I derived the derivatives at https://fractalforums.org/fractal-mathematics-and-new-theories/28/perturbation-theory/487/msg3226#msg3226

Which makes
$u = \begin{pmatrix} X & Y \end{pmatrix} \\ J = \begin{pmatrix} \frac{\partial X}{\partial A} & \frac{\partial X}{\partial B} \\ \frac{\partial Y}{\partial A} & \frac{\partial Y}{\partial B} \end{pmatrix} \\ DE = \frac{|u|^2 \log |u|}{|u . J|}$

How to adapt this to directional DE?

For Mandelbrot it's just not doing absolute values everywhere
$DE = \frac{z \log |z|}{\frac{\partial z}{\partial c}}$

EDIT figured out something that seems to work (treating the u.J as a complex number, instead of a vector of length 2):
$DE = \frac{|u|^2 \log |u|}{u . J}$
« Last Edit: September 11, 2019, 08:32:21 PM by claude, Reason: works »

### Similar Topics

###### M-set distance estimation

Started by gerrit on Fractal Mathematics And New Theories

11 Replies
751 Views
July 08, 2019, 07:08:19 PM
by claude
###### Using distance estimation to determine hue causing very visible banding.
17 Replies
553 Views
October 20, 2018, 07:38:14 AM
###### A mosaic of Intricate Sketches - A Monochromatic Distance Estimation Zoom

Started by Fluoroantimonic_Acid on Fractal movie gallery

0 Replies
111 Views
April 12, 2018, 02:57:29 AM
by Fluoroantimonic_Acid
###### General continuous iteration count + exterior distance estimation

Started by gerrit on Fractal Mathematics And New Theories

4 Replies
161 Views
August 30, 2019, 08:02:15 AM
by gerrit
###### Burning Ship

Started by Bill Snowzell on Fractal Image Gallery

3 Replies
288 Views
September 13, 2017, 11:52:54 PM
by Fraktalist