Jump to content

Mandelbrot set: Difference between revisions

Line 6,572:
n, r = 200, 500 # number of iterations and escape radius (r > 2)
 
height, angledirection = 1.5, 45 # height factor and direction of the incoming light
v = exp(angledirection / 180 * pi * im) # unit 2D vector in this direction
 
x = range(0, 2, length=d+1)
Line 6,599:
U = Z[N] ./ dZ[N]
U = U ./ abs.(U) # unit normal vector to the equipotential lines
T[N]S = maxsin.((real.(U)100 .* real(v) .+ imagangle.(U) .* imag(v) .+/ height)10 ./ (1# +perturbation height),function 0(stripes)
T[N] = max.((real.(U) .* real(v) .+ imag.(U) .* imag(v) .+ height .+ S) ./ (1 + height), 0)
 
heatmap(T .^ 1.0, c=:bone_1)
305

edits

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