Hallo 👋
Diese Domain dient derzeit ausschließlich zum Betrieb eines Mailservers.
Hier ein Integral:
1#!/usr/bin/env python3
2import numpy as np
3import matplotlib.pyplot as plt
4
5def mandelbrot_smooth(c, max_iter):
6 z = np.zeros_like(c, dtype=np.complex128)
7 div_time = np.zeros(c.shape, dtype=float)
8 m = np.full(c.shape, True, dtype=bool)
9
10 for i in range(max_iter):
11 z[m] = z[m] * z[m] + c[m]
12 m_new = np.abs(z) < 1000
13 div_time[m & ~m_new] = i - np.log2(np.log(np.abs(z[m & ~m_new]) + 1e-10))
14 m = m_new
15
16 div_time[div_time == 0] = max_iter
17 return div_time
18
19# Define the domain and resolution
20w, h = 1200, 800
21re = np.linspace(-2.5, 1.5, w)
22im = np.linspace(-1.5, 1.5, h)
23re, im = np.meshgrid(re, im)
24c = re + 1j * im
25
26# Generate the Mandelbrot image
27image = mandelbrot_smooth(c, max_iter=200)
28
29# Plot it with beautiful coloring
30plt.figure(figsize=(10, 8))
31plt.imshow(image, cmap='twilight_shifted', extent=[-2.5, 1.5, -1.5, 1.5], origin='lower')
32plt.axis('off')
33plt.title("Mandelbrot Set", fontsize=16)
34plt.tight_layout()
35plt.show()