Fractal Explorer


#1

Hello,

I made a small Fractal Explorer (exploring the mandelbrot set, by the moment):

This was made for an introductory Meetup session to Rust:

  • Uses the crate eventual for parallel computing. The approach is a naïve one, as it is dividing the scene in a number of rows and assigns them to each thread in order. The join is also made in order. This method is unefficient, but useful for instruction purposes.
  • Uses SDL2 to create an interactive experiece.
  • The fractal set is expandable, I created a modular structure that may accomodate further sets, as the julia set.

This is the first test program I made in Rust, but as the assistants to the meetup liked it, I am sharing it.


#2

I’m curious if its is possible to have infinite zooming capability that is computing additional iterations when at certain zoom is reached.


#3

That is something I enjoyed when playing with the render window.
The computing method I used has a limitation: the resolution of the type f64.
You will see on console the real and imaginary parts as you click on the fractal.

Eventually, you will reach the resolution limit and find a pixelated image.

As this was a basic approach, I did not look for different computing methods when a great zoom is applied.


#4

I’ve also made a small mandelbrot set program that shows how to use various crates to parallelize things (will add more crates in the future).

Feel free to use it in your code if you want.

I had a quick glimpse at your code, nice job! It’s much cleaner than mine :wink:

A nice touch would be if the zooming was smooth and continuous. (This reminds me when BeOS came out they had a nice and fast mandelbrot tool to show off the computational power of their BeBox)


#5

Thanks!
I like your approach, and the fact that you show some benchmarks, they are very useful to compare different multithreading approaches.