Mandelbrot set: Difference between revisions

Content added Content deleted
m (→‎{{header|Python}}: Removed an optimization to make the code more readable.)
m (→‎{{header|Python}}: Another optimization removed to improve comparability.)
Line 7,065: Line 7,065:
u, v = u ** 2 - v ** 2 + a, 2 * u * v + b
u, v = u ** 2 - v ** 2 + a, 2 * u * v + b
T[i][j] = k + 1
T[i][j] = k + 1
else:
break


plt.imshow(T, cmap=plt.cm.twilight_shifted)
plt.imshow(T, cmap=plt.cm.twilight_shifted)