Mandelbrot set: Difference between revisions

Content deleted Content added
Basicgames (talk | contribs)
Majow (talk | contribs)
→‎Normal Maps, Mercator Maps and Deep Zoom Images: Stripes are now independent of height.
Line 8,905:
n, r = 200, 500 # number of iterations and escape radius (r > 2)
 
heightdirection, directionheight = 45, 1.5, 45 # height factordirection and directionheight of the incoming light
v = np.exp(direction / 180 * np.pi * 1j) # unit 2D vector in this direction
 
Line 8,931:
U = Z[N] / dZ[N]
U = U / abs(U) # unit normal vector to the equipotential lines
S = 1 + np.sin(100 * np.angle(U)) / 10 # perturbation function (stripes)
T[N] = np.maximum((U.real * v.real + U.imag * v.imag + heightS +* Sheight) / (1 + height), 0)
 
plt.imshow(T ** 1.0, cmap=plt.cm.bone, origin="lower")
Line 8,941:
U = ZN * AN * ((1 + LN) * np.conj(AN ** 2) - LN * np.conj(ZN * BN))
U = U / abs(U) # unit normal vector to the equidistant lines
T[N] = np.maximum((U.real * v.real + U.imag * v.imag + 1 * height) / (1 + height), 0)
 
plt.imshow(T ** 1.0, cmap=plt.cm.afmhot, origin="lower")