Jump to content

Mandelbrot set: Difference between revisions

m
(→‎Mercator zooms of the Mandelbrot set using NumPy: Fixed sign error and shortened filenames)
Line 7,155:
 
x = np.linspace(0, 2, d, endpoint=False)
y = np.linspace(0, 2 * h / d * h, h, endpoint=False)
 
U, V = np.meshgrid(x - 1, y - h / d)
W = (U - 1) + (V - h / d) * 1j
 
C = (-0.410314 + 0.610216 * 1j) + 1.0 * W
A, B = C.real, C.imag
 
Line 7,175:
plt.savefig("Mandelbrot_set.png", dpi=100)
 
D = 2 / d * np.ones(C.shape)
S = (150 * D) ** 2 # factor depends on the size of the figure
 
Line 7,189:
 
x = np.linspace(0, 2 * np.pi, d, endpoint=False)
y = np.linspace(0, 2 * np.pi * h / d * h, h, endpoint=False)
 
U, V = np.meshgrid(x, -y)
W = np.exp(U * 1j +- V)
 
C = (-0.41031 + 0.61021 * 1j) + 1.0 * W
A, B = C.real, C.imag
 
305

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.