Jump to content

Mandelbrot set: Difference between revisions

(→‎Advanced: Distance estimation and Mercator zoom: The structure is systematically linked to the previous section.)
Line 7,288:
ax.scatter(X, Y, s=S**2, c=D**0.1, cmap=plt.cm.twilight_shifted)
plt.savefig("Mandelbrot_plot.png", dpi=250)</lang>
A small change in the above code allows Mercator zooms of the Mandelbrot set (see David Madore: [http://www.madore.org/~david/math/mandelbrot.html ''Mandelbrot set images and videos''] and Anders Sandberg: [https://www.flickr.com/photos/arenamontanus/sets/72157615740829949 ''Mercator Mandelbrot Maps'']).
InThe themaximum example itmagnification is equalexp(2*pi*h/d) to= exp(2*pi*5.5), which= is535.5^5.5 about= 10^15, andwhich is also the maximum for 64-bit arithmetic.
Compression is used as described by David Madore.
See also [https://www.flickr.com/photos/arenamontanus/sets/72157615740829949 ''Mercator Mandelbrot Maps''] by Anders Sandberg.
The largest magnification is exp(2*pi*h/d).
In the example it is equal to exp(2*pi*5.5), which is about 10^15 and also the maximum for 64-bit arithmetic.
On some architectures, the precision can be extended a bit:
Try G = np.exp(2 * np.pi * (X * 1j - Y), dtype = np.clongdouble) if you are lucky.
Note that Anders Sandberg uses a different scaling.
He uses 10^(3*h/d) = 1000^(h/d) instead of exp(2*pi*h/d) = 535.5^(h/d), so his images appear somewhat compressed in comparison (but not much, because 1000^5 is= approximately10^15 equal to= 535.5^5.5).
With the same pixel density and the same maximum magnification, the difference in height between the maps is only about 10 percent.
<lang python>import numpy as np
305

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.