Show HN: Beyond Z²+C, Plot Any Fractal

(juliascope.com)

76 points | by akunzler 9 hours ago ago

22 comments

  • mreid 6 hours ago

    As someone who taught myself 68000 assembler as a kid in order to render Mandelbrot and Julia sets quickly it still blows my mind a little that fairly hi-res versions of these can be rendered basically instantaneously in a browser using an interpreted language.

    • gerdesj 5 hours ago

      Similar(ish) although I only really got as far as BASIC on a 80286 running DOS 3.something!

      I did manage to get something in C to compile and work with hard coded co-ordinates but it took me ages and didn't float my boat but it was rather faster 8) I suppose I'll always be a scripter.

      I had a copy of the "Beauty of Fractals" and the next one too (can't remember the name). I worked in a books warehouse as a holiday job before Poly (UK Polytechnic - Plymouth) and I think I persuaded my parents to buy me the first and the second may have fallen off a shelf and ended up in the rejects bin. I got several text books for Civil Engineering too, without even needing to cough drop them myself.

      One of the books had pseudo code functions throughout which even I could manage to turn into BASIC code. I remember first seeing a fern leaf being generated by a less than one screen (VGA) program which used an Iterated Function System (IFS) and I think a starter matrix with carefully chosen parameters.

      Nowadays we have rather more hardware ...

      • mreid 3 hours ago

        I also had to convince my parents to buy me books about fractals. My prized possession as a 15 year old was a copy of Mandelbrot's "Fractal Geometry of Nature". A lot of it went over my head but it had some gorgeous colour plates and interesting sections. I still have it at home some 35 years later.

        That also inspired me to write IFS code for ferns, Sierpinski gaskets, and Menger sponges in 68k assembler (after realizing AmigaBASIC was too slow).

    • bongodongobob 5 hours ago

      Ha, same. I remember setting Fractint to render something and hoping it would be done when I got back from school.

  • mg 9 hours ago

    I'm not sure if every fractal can be expressed as an iterative formula f(z,c).

    In 2012 I found a fractal by using a fundamentally different approach. It arises when you colorize the complex plane by giving each pixel a grey value that corresponds to the percentage of gaussian integers that it can divide:

    https://www.gibney.org/does_anybody_know_this_fractal

    • badosu 4 hours ago

      You can make a fractal out of the state graph of a double pendulum: https://www.youtube.com/watch?v=dtjb2OhEQcU

      I don't doubt there could be an iterative formula that maps to it, but I'd be very surprised.

    • akunzler 9 hours ago

      Good point, this site then supports every (as far as I know) fractal you make with iterations of complex numbers and constant cutoff values, mandelbrot style.

      There are surely infinitely many more ways to generate other families of fractals though

    • zahlman 7 hours ago

      > I'm not sure if every fractal can be expressed as an iterative formula f(z,c).

      It's also unclear to me that every iterative f(z,c) formula will produce something visually interesting, or indeed that meets the definition of "fractal".

    • akomtu 9 hours ago

      What's the heck is gaussian integers? I've tried to parse your article, but still confused.

      • Sharlin 9 hours ago

        Simply the complex numbers where the real and imaginary parts are both integers. Eg. 0, 3+i, 123-45i, -7+8i. Same as the 2D grid of integer Cartesian coordinates.

      • mg 8 hours ago

        You can think of them as the complex equivalents to normal integers.

        Complex numbers have two components. If both are integers, the complex number is a Gaussian integer.

      • bmacho 8 hours ago
  • ttoinou 8 hours ago

    My favorite alternative to Mandelbrot is the Monkelbrot, I made this 13 years ago (probably I discovered this formula on the old fractalforums.com)

    https://www.deviantart.com/titoinou/art/The-42-MonkelBrot-29...

      f(z) = ( (z*c-1)^2 - 1 )^2 - 1 
    
    It features Classic Quadratic Mandelbrots z^2 and also Quartic Brots z^4 in one set, that is apparently connected (I didn't prove this yet...). Also, it doesn't go crazy like others alternative, it stays nicely behaved like the original Mandelbrot set. You can copy paste "( (z*c-1)^2 - 1 )^2 - 1" without the quotes on this site to explore the fractal

    It's really fascinating when navigating the fractal to try to understand where would a z^2 minibrot appear vs. where would a z^4 minibrot appear

    • OgsyedIE 8 hours ago

      It is tragically the case that most of the archives of fractalforums are irretrievable and lost media. The archive.org copies are very incomplete and the database dumps, as far as my research last year could figure out, are locked behind a group of moderators of an inadequately programmed successor site who don't want to share them, considering the dumps to be a status moat for themselves.

      • ttoinou 5 hours ago

        Yeah I was sad about that

    • akunzler 5 hours ago

      The Monkelbrot! https://www.juliascope.com/share/6876dcfda602d0a43f41b2e9

      Sounds like I missed out on fractalforums.com :/ oh the webpages lost to the ether

      • ttoinou 4 hours ago

        Hehe, I missed the sharing feature thanks.

        IIRC it was a user named monk who found a method to generate any Monkelbrot set containing our customized choice of any z^n brots

        I found the (2,4) pair the most beautiful

  • Eduard an hour ago

    > Fun ones to try include - sin(z^2+c) - c^z - z^{1.7}+c

    - the broken formatting confused me.

    - couldn't test any of these via copy and paste: c&p doesn't work at least on Chrome Android for the expression input.

    nevertheless: very cool. I especially love the parameter animation

  • brandonpelfrey 5 hours ago

    A long time ago I tried a version of this (https://github.com/brandonpelfrey/complex-function-plot). Can you add texture lookup to yours? Escape time could map to one texture dimension and you can arbitrarily make up another dimension for texture lookup. Being able to swap in random images can be fun nice demo!

  • OgsyedIE 9 hours ago

    This was a great nostalgia trip to my days on fractalforums, before the web got much denser. I tried playing around with the settings but I was unable to reproduce the two-dimensional version of Tom Lowe's Mandelbox map, discovered in 2010:

    https://sites.google.com/site/mandelbox/what-is-a-mandelbox

    There are galleries on the other pages of the site, if anybody is interested.

  • JoshTriplett 4 hours ago

    This is a lot of fun to play with. However, I managed to find a case where it got extremely slow. I changed z^2+c to z^a+c (a from 1..3), and it suddenly got many orders of magnitude slower.

  • dejobaan 8 hours ago

    I like things where you can just jump into the guts and play around. If you spend enough time plinking, you can end up getting an intuitive feel for a system. Also surprised at how many iterations you can crank out these days; I once implemented a Mandel-generator on my TI-81 calculator, and that took forever. Thank you for creating and sharing this!