Mandelbrot set: Difference between revisions
→Distance Estimation, Normal Maps, Mercator Maps and Deep Zoom: Formulas adapted to the source. Long lines shortened.
(→Distance Estimation, Normal Maps, Mercator Maps and Perturbation Theory: Formulas adapted to the source. Long lines shortened.) |
(→Distance Estimation, Normal Maps, Mercator Maps and Deep Zoom: Formulas adapted to the source. Long lines shortened.) |
||
Line 8,975:
plt.imshow(D ** 0.1, cmap=plt.cm.twilight_shifted, origin="lower")
plt.savefig("
N = abs(Z) > 2 # normal map 1 (potential function)
U = Z[N] / dZ[N]
U = U / abs(U)
T[N] = np.maximum
plt.imshow(T ** 1.0, cmap=plt.cm.gray, origin="lower")
plt.savefig("
N = abs(Z) > 2 # normal map 2 (distance estimation)
LN, ZN,
U = ZN *
U = U / abs(U)
T[N] = np.maximum
plt.imshow(T ** 1.0, cmap=plt.cm.gray, origin="lower")
plt.savefig("
A small change in the code above creates Mercator maps 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'']).
Line 9,032 ⟶ 9,034:
ax[1, 0].scatter(X[3*z:3*z+c], Y[3*z:3*z+c], s=R[0:c]**2, c=D[3*z:3*z+c]**0.3, cmap=plt.cm.nipy_spectral)
ax[1, 1].scatter(X[4*z:4*z+c], Y[4*z:4*z+c], s=R[0:c]**2, c=D[4*z:4*z+c]**0.2, cmap=plt.cm.nipy_spectral)
plt.savefig("
For deep zoom images it is sufficient to calculate a single point with high accuracy. A good approximation can then be found for all other points by means of a perturbation calculation with standard accuracy. See [https://en.wikipedia.org/wiki/Plotting_algorithms_for_the_Mandelbrot_set#Perturbation_theory_and_series_approximation Perturbation theory] (Wikipedia) and [https://gbillotey.github.io/Fractalshades-doc/math.html Mathematical background] (Fractalshades) for more details.
|