Mandelbrot set: Difference between revisions
m
→Normalized Iteration Count, Distance Estimation and Mercator Maps: The Mandelbrot set is printed with smooth colors only.
(→{{header|Python}}: re-created the NumPy comparison) |
m (→Normalized Iteration Count, Distance Estimation and Mercator Maps: The Mandelbrot set is printed with smooth colors only.) |
||
Line 7,525:
===Normalized Iteration Count, Distance Estimation and Mercator Maps===
The Mandelbrot set is printed with smooth colors.
The ''e^(-|z|)-smoothing
Finally, the Mandelbrot set is also printed with a scatter plot which will be misused later for a nice effect.
<lang python>import numpy as np
Line 7,550:
plt.imshow(S ** 0.1, cmap=plt.cm.twilight_shifted)
plt.savefig("Mandelbrot_set_1.png", dpi=250)
N = abs(Z) > r # normalized iteration count
Line 7,558 ⟶ 7,555:
plt.imshow(T ** 0.1, cmap=plt.cm.twilight_shifted)
plt.savefig("
N = abs(Z) > 2 # exterior distance estimation
Line 7,564 ⟶ 7,561:
plt.imshow(D ** 0.1, cmap=plt.cm.twilight_shifted)
plt.savefig("
X, Y = C.real, C.imag
Line 7,600 ⟶ 7,597:
plt.imshow(S.T ** 0.1, cmap=plt.cm.nipy_spectral_r)
plt.savefig("Mercator_map_1.png", dpi=250)
N = abs(Z) > r # normalized iteration count
Line 7,608 ⟶ 7,602:
plt.imshow(T.T ** 0.1, cmap=plt.cm.nipy_spectral_r)
plt.savefig("
N = abs(Z) > 2 # exterior distance estimation
Line 7,614 ⟶ 7,608:
plt.imshow(D.T ** 0.1, cmap=plt.cm.nipy_spectral)
plt.savefig("
X, Y = C.real, C.imag
|