• February 25, 2021, 04:47:54 PM

Login with username, password and session length

Author Topic:  Mandelbrot interior DE  (Read 316 times)

0 Members and 1 Guest are viewing this topic.

Offline xenodreambuie

  • Fractal Friar
  • *
  • Posts: 111
Mandelbrot interior DE
« on: November 04, 2020, 09:40:27 PM »
I had a request for a Mandelbrot orbit trap shape in Jux. I had my doubts, so I tried Julia set orbit traps first, and that worked quite well. For Mandelbrot, the trap needs a smooth interior DE to get the right shape. That's important for using slope, whereas coloring is not so critical. I managed to do that with some help from Claude's blog page about it (https://mathr.co.uk/blog/2014-11-02_practical_interior_distance_rendering.html)

I used essentially the unbiased method, as my orbit trap methods don't have access to previous pixels. Speed is better than I thought, although it takes a hit with cellular or other orbit trap options that don't bail on the first trap hit. Here is an example of a Julia set with a Mandelbrot trap.

Encouraged by this, I tried using interior DE for general Mandelbrot iteration, but had some issues (continued in another post...)

Linkback: https://fractalforums.org/programming/11/mandelbrot-interior-de/3846/

Offline xenodreambuie

  • Fractal Friar
  • *
  • Posts: 111
Re: Mandelbrot interior DE
« Reply #1 on: November 04, 2020, 10:26:40 PM »
For Mandelbrot interiors of general formulas, I have been using the exterior DE, because it's easy to calculate. Although it's not correct, it tends to work at the boundaries (or one of them if using two different critical points), but is often not smooth at iteration bands. The interior DE had looked a bit scary for a general case, but as it turns out to only need calculating in the period checking loop (which I already do after convergence), and I already had everything needed for the recurrence calculation except for the second derivative, it was worth a try.

For initial tests I used a central difference for d2/dz2 in the base formula class (I use 1/50 pixel for the interval, scaling up when near the zoom precision limit). It works as expected, except that you start to see noise when zooming by only 1e3 (and with some formulas even in some areas without zooming). So it does need analytic expressions for the second derivative (although one can ignore any Abs terms for this). Unfortunately, that can get ugly for some parameterized rational formulas, so it will take some work. I'm tempted not to bother for formulas that don't get zoomed much and that people usually either use potential coloring or Julia sets anyway. Whereas the first derivative doing forward differencing is generally fine.

But there is another issue. The results are smooth, but don't always match the set boundary. That's no problem for coloring and slope lighting, but it messes up boundary coloring using the DE. Here are examples using a Nova Mandelbrot set (0.75z + z-2 + c) and colored with the log of the DE. The first image uses interior DE. The second image uses exterior DE, with black boundary coloring.

Is anyone else using interior DE for general Mandelbrots, and do you have the same issue or not?
My method is to iterate until the point escapes or reaches maxiters, then iterate from the critical point (same or different one) until it converges to the previous point or reaches maxiters. If it converges, iterate more to find the period (and do the interior DE in this loop, as it will have a valid z0 and period.)

Offline xenodreambuie

  • Fractal Friar
  • *
  • Posts: 111
Re: Mandelbrot interior DE
« Reply #2 on: November 07, 2020, 09:04:00 PM »
In the absence of better ideas, for interior Mandelbrot regions I'm trying the interior DE calculation for coloring and slope and exterior DE calculation for the set boundary, which works well. Here is an example with a Nova Mandelbrot (not using slope lighting.)

Offline claude

  • 3f
  • ******
  • Posts: 1781
    • mathr.co.uk
Re: Mandelbrot interior DE
« Reply #3 on: December 18, 2020, 01:18:32 PM »
Does the Mandelbrot power 2 interior distance formula need any modification for other powers / formulas?

Maybe the second derivatives can be calculated by extended dual numbers so you don't have to do the horrible algebra by hand for all formulas - I can probably dig out a reference with implementation notes if you want...
Hessian matrices or so might be needed for non-complex-analytic formulas (e.g. Burning Ship), do you implement any of them?

Offline xenodreambuie

  • Fractal Friar
  • *
  • Posts: 111
Re: Mandelbrot interior DE
« Reply #4 on: December 18, 2020, 09:39:09 PM »
Does the Mandelbrot power 2 interior distance formula need any modification for other powers / formulas?

Maybe the second derivatives can be calculated by extended dual numbers so you don't have to do the horrible algebra by hand for all formulas - I can probably dig out a reference with implementation notes if you want...
Hessian matrices or so might be needed for non-complex-analytic formulas (e.g. Burning Ship), do you implement any of them?

The formula doesn't need any modification. The important change I had to make was generalizing the recurrence relations to use the proper derivatives (and correctly guessing where the second derivatives are.)

Now that I've done all the formulas it's not much of a task to do a few new ones as they arise, and it's convenient to use standard extended for everything relevant. For most rational functions it's convenient to use the formula for 2nd derivatives in terms of f,g,f',g',f'',g'' rather than one huge explicit formula. But parameterized powers do complicate the logic somewhat. I usually have a loop to calculate powers with a bunch of conditionals in it.

I am ignoring absolute options in all 2nd derivatives, and this works well, even when including them in first derivatives. It doesn't affect the aesthetics if the result isn't necessarily technically correct with these formulas, as they have discontinuities anyway. Also, for most general formulas, Mandelbrots with abs are not interesting, just useful for finding the best Julia sets, so the interior distance isn't very important for them.

I did not implement this for any of the real number formulas I have such as gnarls and Gumowski-Mira attractor, which are only interesting in Julia form.

Also, Jux only has formulas of form f(z)+c at present. If I ever get around to including some f(z,c) formulas with distance estimation that will take extra work.


xx
Mandelbrot set interior description with simple geometric objects

Started by marcm200 on Fractal Mathematics And New Theories

5 Replies
585 Views
Last post March 19, 2020, 07:47:52 AM
by marcm200
clip
Interior colorings

Started by nickspiker on Fractal Mathematics And New Theories

31 Replies
1896 Views
Last post October 27, 2020, 10:52:32 PM
by nickspiker
clip
interior of parabolic julia set

Started by Adam Majewski on Programming

4 Replies
455 Views
Last post March 25, 2019, 04:28:50 PM
by marcm200
clip
Explicit equations for the interior of hyperbolic components

Started by marcm200 on Fractal Mathematics And New Theories

28 Replies
1495 Views
Last post November 27, 2020, 02:41:17 PM
by marcm200
xx
Burning Ship with Lyapunov exponent interior colouring

Started by claude on Fractal Image Gallery

2 Replies
349 Views
Last post January 09, 2018, 09:20:59 AM
by claude