Show HN: Beyond Z²+C, Plot Any Fractal
20 comments
·July 15, 2025mreid
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
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 ...
bongodongobob
Ha, same. I remember setting Fractint to render something and hoping it would be done when I got back from school.
mg
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:
badosu
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
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
> 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
What's the heck is gaussian integers? I've tried to parse your article, but still confused.
Sharlin
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
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.
brandonpelfrey
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!
JoshTriplett
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.
ttoinou
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 fractalIt'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
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
Yeah I was sad about that
akunzler
The Monkelbrot! https://www.juliascope.com/share/6876dcfda602d0a43f41b2e9
Sounds like I missed out on fractalforums.com :/ oh the webpages lost to the ether
ttoinou
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
OgsyedIE
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.
dejobaan
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!
I've always been dissatisfied that simple Mandelbrot explorers proport themselves as a Fractal Graphing Calculator. In summer break between semesters, I started making a real graphing calculator, parsing LaTeX to WebGL to let you graph most any combination of z and c.
Fun ones to try include - sin(z^2+c) - c^z - z^{1.7}+c
Also supports animation, just enter any other letter and turn it into a variable. Supports Mandelbrot or Julia Set style calculation.
Use with a graphics card or integrated graphics