File:Mandelbrot numpy set 1.png
Original file (2,560 × 1,920 pixels, file size: 1.04 MB, MIME type: image/png)
Captions
Summary
[edit]DescriptionMandelbrot numpy set 1.png |
Deutsch: Die Mandelbrot-Menge wird mit NumPy unter Verwendung komplexer Matrizen berechnet. Die verwendeten Färbungen werden von Javier Barrallo, Damien M. Jones und Arnaud Chéritat beschrieben: exp(−z)-Smoothing, Normalized Iteration Count, Exterior Distance Estimation und Boundary Detection. English: The Mandelbrot set is calculated with NumPy using complex matrices. The colorings used are described by Javier Barrallo, Damien M. Jones and Arnaud Chéritat: exp(−z)-Smoothing, Normalized Iteration Count, Exterior Distance Estimation and Boundary Detection. |
Date | |
Source | Own work |
Author | Majow |
Other versions |
|
PNG development InfoField | This plot was created with Matplotlib. |
Source code InfoField | Python codeimport numpy as np
import matplotlib.pyplot as plt
d, h = 800, 600 # pixel density (= image width) and image height
n, r = 200, 500 # number of iterations and escape radius (r > 2)
x = np.linspace(0, 2, num=d+1)
y = np.linspace(0, 2 * h / d, num=h+1)
A, B = np.meshgrid(x - 1, y - h / d)
C = 2.0 * (A + B * 1j) - 0.5
Z, dZ = np.zeros_like(C), np.zeros_like(C)
D, S, T = np.zeros(C.shape), np.zeros(C.shape), np.zeros(C.shape)
for k in range(n):
M = abs(Z) < r
S[M], T[M] = S[M] + np.exp(- abs(Z[M])), T[M] + 1
Z[M], dZ[M] = Z[M] ** 2 + C[M], 2 * Z[M] * dZ[M] + 1
fig = plt.figure(figsize=(12.8, 9.6))
fig.subplots_adjust(left=0.05, right=0.95, bottom=0.05, top=0.95)
ax1 = fig.add_subplot(2, 2, 1)
ax1.imshow(S ** 0.1, cmap=plt.cm.twilight_shifted, origin="lower")
N = abs(Z) >= r # normalized iteration count
T[N] = T[N] - np.log2(np.log(abs(Z[N])) / np.log(r))
ax2 = fig.add_subplot(2, 2, 2)
ax2.imshow(T ** 0.1, cmap=plt.cm.twilight_shifted, origin="lower")
N = abs(Z) > 2 # exterior distance estimation
D[N] = np.log(abs(Z[N])) * abs(Z[N]) / abs(dZ[N])
ax3 = fig.add_subplot(2, 2, 3)
ax3.imshow(D ** 0.1, cmap=plt.cm.twilight_shifted, origin="lower")
N, thickness = D > 0, 0.01 # boundary detection
D[N] = np.maximum(1 - D[N] / thickness, 0)
ax4 = fig.add_subplot(2, 2, 4)
ax4.imshow(D ** 2.0, cmap=plt.cm.binary, origin="lower")
fig.savefig("Mandelbrot_numpy_set_1.png", dpi=200)
|
Licensing
[edit]This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 22:35, 24 September 2023 | 2,560 × 1,920 (1.04 MB) | Majow (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage on Commons
The following 6 pages use this file:
File usage on other wikis
The following other wikis use this file:
- Usage on de.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Software used | |
---|---|
Horizontal resolution | 78.74 dpc |
Vertical resolution | 78.74 dpc |