Jump to content

Mandelbrot set: Difference between revisions

m
→‎{{header|Python}}: Removed an optimization to make the code more readable.
(Added output. Added a graphical version.)
m (→‎{{header|Python}}: Removed an optimization to make the code more readable.)
Line 7,062:
u, v = 0.0, 0.0
for k in range(n):
u, v =if u ** 2 -+ v ** 2 +< a, 2r * u * v + b2:
if not u, v = u ** 2 +- v ** 2 <+ ra, 2 * u * 2:v + b
T[i][j] = k + 1
else:
break
T[i][j] = k + 1
 
plt.imshow(T, cmap=plt.cm.twilight_shifted)
305

edits

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