Fractal Generation: A Rustacean’s Prespective (2021)
blocr.github.io
blocr.github.io
[1] in the "c" folder in https://github.com/pflanze/mandelbrot
(I also implemented the same algorithm again in C++ later on, cleaner, but haven't published that (yet).)
If you'd like to compare yourself, change `depth` in main.c to 1000, `w` and `h` in `renderScene` to your image size, and change `xcenter`, `ycenter`, and `size` to values that correspond to yours (size is simply the width of the picture in mandelbrot values, instead of pixels). Ah, but it still calculates only 2 pixels at a time, I'll need to look into that tomorrow.
From an optimization point of view, it means that if a rectangular area's edges contains only values reached the iteration limit without growing larger than the escape value, the entire area belongs to the Mandelbrot set.
Simply-connected sets and compact sets are both sometimes informally described as "sets with no holes," but the definition of "holes" is different in both cases.
A compact set contains all of its limiting points (i.e. limits of convergent sequences of points within the set). Therefore it may not have any point-shaped holes. But it may still have a hole shaped like, e.g. an open disc.
To rule out such large holes, you want a simply-connected set, which is a connected set in which any closed path can be continuously shrunk to a point.
For those that want to fly around in the mandelbrot set, even a 2015 desktop can easily keep up, I suggest Xaos which I believe includes all the common mandelbrot optimizations at https://xaos-project.github.io/
There's even a web version at the above URL. It's in most linux repos I tried apt or yum. I couldn't find any docs for what optimizations Xaos uses, but it seems plenty fast for real time zooming, even on old hardware.
Or you can set up a grid and calculate the chunks.
When I was learning a new language in my collage days, my helloworld used to be implementing a Mandelbrot/Julia set on the given language. A few months ago I decided to look into Rust and started to work on my helloworld in Rust, using RayLib :-)
Here's an example output from my version: https://ibb.co/p4bFF7S
There was a Mandelbrot/Julia set renderer on the Atari ST that did the exact same thing. Instead of waiting rather long for a pixel-perfect image you could see output immediately and it got more refined with each recursive stage. On a box with a 68000 CPU @ ~8 MHz and no FPU it made for a really nice effect.
I had a university account on a ultrix system, so I ported my pascal to produce 600 dpi bitmaps compressed with RLE. But the fortran libs I could find where only on the VMS system so I moved them over to convert to postscript. The 10 foot long printer in the lab usually spat out 100 pages per minute of pure ASCII stopped for a minute or two processing my 600 dpi mandelbrot. The lab attended ran over to reboot it, I pleaded my case. They waited, were amazed at the result, and everyone wanted one.
Years later fractint came out, and each version seemed to have yet another optimization to make mandelbrots faster. One fun optimization was to surf the edge of a particular depth, then keep progressing inward. Calculating only the edges of the depth changes was fun to watch.