Python 3 code ################################################### # 2D Julia set with complex arrays (c=-0.7454294) # (matplotlib module) ################################################### import numpy as np # import numpy module import matplotlib.pyplot as plt # import matplotlib module n = 9 # set number of cycles Cx = -0.7454294 # set c parameter real part value Cy = 0 # set c parameter imaginary part value C = Cx + 1j*Cy L = 1.7 # set square area side M = 2024 # set side number of pixels x = np.linspace(-L,L,M) # x variable array y = np.linspace(-L,L,M) # y variable array X,Y = np.meshgrid(x,y,sparse=True) # square area grid Z = X + 1j*Y # complex plane area for k in range(1,n+1): # recursion cycle Z1 = Z**2 + C #alternative Z1 = Z**4 + C Z = Z1 W = np.e**(-abs(Z)) # smoothed sum moduls plt.imshow(W,interpolation=’nearest’, cmap=plt.cm.nipy_spectral) plt.axis("off") plt.show() # plot image