Mandelbrot set: Difference between revisions
m
→Normal Map Effect, Mercator Projection and Deep Zoom Images
m (→Normal Map Effect, Mercator Projection and Perturbation Theory: Much nicer stripes) |
|||
Line 10,916:
direction, height = 45, 1.5 # direction and height of the incoming light
stripes, damping =
x = np.linspace(0, 2, num=d+1)
Line 10,932:
Z[M], dZ[M], ddZ[M] = Z[M] ** 2 + C[M], 2 * Z[M] * dZ[M] + 1, 2 * (dZ[M] ** 2 + Z[M] * ddZ[M])
N = abs(Z) >=
P, Q = S[N] / T[N], (S[N] + np.sin(stripes * np.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), np.exp(direction / 180 * np.pi * 1j) # unit normal vectors and unit 2D vector
Line 10,949 ⟶ 10,943:
plt.savefig("Mandelbrot_normal_map_1.png", dpi=200)
N = abs(Z) >=
U = Z[N] * dZ[N] * ((1 + np.log(abs(Z[N]))) * np.conj(dZ[N] ** 2) - np.log(abs(Z[N])) * np.conj(Z[N] * ddZ[N]))
U, v = U / abs(U), np.exp(direction / 180 * np.pi * 1j) # unit normal vectors and unit 2D vector
|