Mandelbrot set: Difference between revisions
→Mercator zooms of the Mandelbrot set using NumPy: added several improvements
m (→Mercator zooms of the Mandelbrot set using NumPy: The same center point was used for both examples) |
(→Mercator zooms of the Mandelbrot set using NumPy: added several improvements) |
||
Line 7,151:
import matplotlib.pyplot as plt
d, h =
n, r = 50, 2.5 # number of iterations and escape radius (r > 2)
x = np.linspace(
y = np.linspace(
U, V = np.meshgrid(x -
W = U + V * 1j
C = -0.41031 + 0.61021 * 1j +
A, B = C.real, C.imag
Line 7,175:
plt.savefig("Mandelbrot_image.png", dpi=100)
D =
S = (
fig, ax = plt.subplots(figsize=(8, 6))
Line 7,188:
n, r = 100, 2.5 # number of iterations and escape radius (r > 2)
x = np.linspace(
y = np.linspace(
U, V = np.meshgrid(x, -y)
Line 7,210:
D = 2 * np.pi / d * abs(W)
S = (
fig, ax = plt.subplots(3, 2, figsize=(12, 18))
|