Mandelbrot set: Difference between revisions
m
→Normalized Counting, Distance Estimation, Mercator Maps and Deep Zoom: Removed local variables (slightly slower but more readable)
m (→Normalized Counting, Distance Estimation, Mercator Maps and Deep Zoom: Replaced slow abs function with faster abs2 calculation) |
m (→Normalized Counting, Distance Estimation, Mercator Maps and Deep Zoom: Removed local variables (slightly slower but more readable)) |
||
Line 8,979:
D, I, J = np.zeros(C.shape), np.zeros(C.shape, dtype=np.int64), np.zeros(C.shape, dtype=np.int64)
for k in range(n): # you can also try range(2*n) due to rebasing
E[R], I[R] = Z[R], J[R] # rebase if z is closer to zero
E[M], I[M] = (2 * S[I[M]] + E[M]) * E[M] + C[M], I[M] + 1
|