Mandelbrot set: Difference between revisions
m
→Normal Map Effect, Mercator Projection and Perturbation Theory: Small corrections and simplifications
m (→Normal Map Effect, Mercator Projection and Perturbation Theory: Small corrections and simplifications) |
|||
Line 7,986:
direction, height = 45, 1.5 # direction and height of the incoming light
stripes, damping =
x = range(0, 2, length=d+1)
Line 8,003:
end
N = abs.(Z) .>=
P, Q = S[N] ./ T[N], (S[N] .+ sin.(stripes .* angle.(Z[N]))) ./ (T[N] .+ 1)
F =
H = F .* P .+ (
U = Z[N] ./ dZ[N] # normal vectors to the equipotential lines
U, v = U ./ abs.(U), exp(direction / 180 * pi * im) # unit normal vectors and unit 2D vector
Line 8,020 ⟶ 8,014:
savefig("Mandelbrot_normal_map_1.png")
N = abs.(Z) .>=
U = Z[N] .* dZ[N] .* ((1 .+ log.(abs.(Z[N]))) .* conj.(dZ[N] .^ 2) .- log.(abs.(Z[N])) .* conj.(Z[N] .* ddZ[N]))
U, v = U ./ abs.(U), exp(direction / 180 * pi * im) # unit normal vectors and unit 2D vector
|