kuromusha / mandelbrot-chaco

Mandelbrot Plotting with Panning and Zooming in TraitsUI and Chaco
MIT License
0 stars 1 forks source link

Adaptive detail level #2

Closed timdiller closed 1 year ago

timdiller commented 1 year ago

As you zoom in farther and farther, you start to lose resolution on the edge of the stable region. This can be fixed by increasing the value of n passed to generate_mandelbrot. Here's what it looks like with the default n=100.

image

And here's a similar view with n=1000, but of course, this is much slower.

Screenshot 2023-04-25 at 14 31 01

With a bit of experimentation, you should be able to determine a logarithmic relationship between the visible scale and the number of iterations. For reference, in the initial view the vertical range is 3, and n=100 is sufficient; in my example, when the vertical range is about 0.003, n=1000 seems to be more than sufficient.

kuromusha commented 1 year ago

@timdiller Thank you for your comment. I modified the code to change the number of iterations by the range by #4.