Mandelbrot set: Difference between revisions
Content added Content deleted
(→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: | Line 7,288: | ||
ax.scatter(X, Y, s=S**2, c=D**0.1, cmap=plt.cm.twilight_shifted) |
ax.scatter(X, Y, s=S**2, c=D**0.1, cmap=plt.cm.twilight_shifted) |
||
plt.savefig("Mandelbrot_plot.png", dpi=250)</lang> |
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'']). |
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'']). |
||
⚫ | |||
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). |
|||
⚫ | |||
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. |
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 |
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 = 10^15 = 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. |
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 |
<lang python>import numpy as np |