Mandelbrot set: Difference between revisions
→Advanced: Distance estimation and Mercator zoom: Explanation shortened
(→Advanced: Distance estimation and Mercator zoom: The structure is systematically linked to the previous section.) |
(→Advanced: Distance estimation and Mercator zoom: Explanation shortened) |
||
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'']).
▲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.
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
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
|