Mandelbrot set: Difference between revisions
→Mercator zooms of the Mandelbrot set using NumPy: Fixed sign error and shortened filenames
(→Mercator zooms of the Mandelbrot set using NumPy: added several improvements) |
(→Mercator zooms of the Mandelbrot set using NumPy: Fixed sign error and shortened filenames) |
||
Line 7,157:
y = np.linspace(0, 2 * h / d, h, endpoint=False)
U, V = np.meshgrid(x - 1,
W = U + V * 1j
Line 7,173:
fig, ax = plt.subplots(figsize=(8, 6))
ax.imshow(T, cmap=plt.cm.twilight_shifted, vmin=0, vmax=n)
plt.savefig("
D = 2 / d * np.ones(C.shape)
Line 7,180:
fig, ax = plt.subplots(figsize=(8, 6))
ax.scatter(A, B, s=S, c=T, cmap=plt.cm.twilight_shifted, vmin=0, vmax=n)
plt.savefig("
A small change in the code above allows Mercator zooms of the Mandelbrot set (see [http://www.madore.org/~david/math/mandelbrot.html Mandelbrot set images and videos]).
<lang python>import numpy as np
|