Mandelbrot set: Difference between revisions
→Normal Map Effect, Mercator Projection and Perturbation Theory: Improvement: Larger iteration numbers are now possible.
m (→Normal Map Effect, Mercator Projection and Deep Zoom Images: Minor character changes.) |
(→Normal Map Effect, Mercator Projection and Perturbation Theory: Improvement: Larger iteration numbers are now possible.) |
||
Line 8,052:
setrounding(BigFloat, RoundNearest) # set rounding mode (default)
d, h =
n, r =
a = BigFloat("-1.256827152259138864846434197797294538253477389787308085590211144291")
b = BigFloat(".37933802890364143684096784819544060002129071484943239316486643285025")
S = zeros(Complex{Float64}, n+
let c = a + b * im, z = zero(c)
for k in 1:n+1
Line 8,065:
z = z ^ 2 + c
else
break
end
end
Line 8,080 ⟶ 8,081:
iteration(E, C, I) = (2 .* S[I] .+ E) .* E .+ C, I .+ 1
for k in 1:n
M, R = abs2.(Z) .< abs2(r), abs2.(Z) .<= abs2.(E)
E[R], I[R] = Z[R], J[R] # rebase
E[M], I[M] = iteration(E[M], C[M], I[M])
Z[M], dZ[M] = S[I[M]] .+ E[M], 2 .* Z[M] .* dZ[M] .+ 1
|