• February 27, 2021, 04:32:15 AM

Login with username, password and session length

Author Topic:  Mandelbrot ... but with no main cardioid!  (Read 670 times)

0 Members and 1 Guest are viewing this topic.

Offline quadralienne

  • Fractal Fanatic
  • ***
  • Posts: 26
  • infinite border, finite area
Mandelbrot ... but with no main cardioid!
« on: June 20, 2019, 09:34:19 PM »
Once upon a time I stumbled across

https://commons.wikimedia.org/wiki/File:Parameter_plane_and_Mandelbrot_set_for_f(z)_%3D_z%5E4_%2B_m*z.png

and I worked through the C code (languages without native complex numbers make me sad) to convert it to a MathMap expression:

unit filter JustCircles ()

  Mmax = 4096;
  Escape = 3;
  Escape2 = Escape * Escape;

  if r < 1.0 || abs(ri:[x-4/3,y]) < 1/3 || abs(ri:[x+4/3*cos(pi/3),abs(y)-4/3*sin(pi/3)]) < 1/3 then
    rgba:[0,0,0,1]
  else
    Mc = ri:[x,y];

    ang = atan(-y,-x)/3.0;
    rad = (0.0625 * (y*y+x*x)) ^ (1/6);

    Mz = ri:[rad * cos(ang), rad * sin(ang)];

    Mcount = 0;

    while ((Mz[0]*Mz[0]+Mz[1]*Mz[1]) < Escape2) && (Mcount < Mmax) do
      Mcount = Mcount + 1;
      Mz = Mz ^ 4 + Mz * Mc;
    end;

    if Mcount < Mmax then
      dist = log( Mcount + 1 - (log(log(abs(Mz)))/log(Escape)) ) / log(Mmax);

      hue = pmod(arg(Mz)/(2*pi), 1);
      sat = (1 - dist) ^ 2;
      val = sqrt(dist);

      toRGBA(hsva:[ hue, sat, val, 1 ])
    else
      rgba:[0,0,0,1]
    end
  end
end

filter JustCircles_p ()
  JustCircles(xy:[0.25 + 2.5 * x, 2.5 * y])
end


Linkback: https://fractalforums.org/share-a-fractal/22/mandelbrot-but-with-no-main-cardioid/2890/

Offline Adam Majewski

  • Fractal Frogurt
  • ******
  • Posts: 451
Re: Mandelbrot ... but with no main cardioid!
« Reply #1 on: June 21, 2019, 04:19:23 PM »
You are right that c has also complex type and in new programs I use it.

Offline chronologicaldot

  • Fractal Friend
  • **
  • Posts: 10
  • Unconventional Formulaic Object
    • Personal Website
Re: Mandelbrot ... but with no main cardioid!
« Reply #2 on: July 29, 2019, 10:07:43 PM »
That's really cool! It's hard to tell whether it truly follows the Mandelbrot pattern on the tips or if it's now a bunch of successively shrinking circles.
There are no bad fractal parameters. There are simply those that haven't been tweaked enough.

Offline Adam Majewski

  • Fractal Frogurt
  • ******
  • Posts: 451

Offline 3DickUlus

  • Administrator
  • *******
  • Posts: 2050
    • Digilantism
Re: Mandelbrot ... but with no main cardioid!
« Reply #4 on: July 31, 2019, 05:16:00 AM »

https://upload.wikimedia.org/wikipedia/commons/0/03/Parameter_plane_and_Mandelbrot_set_for_f%28z%29_%3D_z%5E4_%2B_m%2Az.png

You can use BBC code for image URLs with weird characters and for wiki images use the image URL not the image page url ;)
Code: [Select]
[img]https://upload.wikimedia.org/wikipedia/commons/0/03/Parameter_plane_and_Mandelbrot_set_for_f%28z%29_%3D_z%5E4_%2B_m%2Az.png[/img]
[url=https://upload.wikimedia.org/wikipedia/commons/0/03/Parameter_plane_and_Mandelbrot_set_for_f%28z%29_%3D_z%5E4_%2B_m%2Az.png]https://upload.wikimedia.org/wikipedia/commons/0/03/Parameter_plane_and_Mandelbrot_set_for_f%28z%29_%3D_z%5E4_%2B_m%2Az.png[/url]
« Last Edit: July 31, 2019, 05:55:29 AM by 3DickUlus, Reason: typo »

Offline quadralienne

  • Fractal Fanatic
  • ***
  • Posts: 26
  • infinite border, finite area
Re: Mandelbrot ... but with no main cardioid!
« Reply #5 on: August 02, 2019, 10:48:13 PM »
It's not just circles, it's Mandelbrotty all over!

Offline quadralienne

  • Fractal Fanatic
  • ***
  • Posts: 26
  • infinite border, finite area
Re: Mandelbrot ... but with no main cardioid!
« Reply #6 on: August 02, 2019, 11:21:43 PM »
Here's an 8192x zoom at 1.98835 + 0.183i ... uh, fuzzy because single precision!