(Re, Im, imax)
| 41 | return np.uint8(i) |
| 42 | |
| 43 | def MB(Re, Im, imax): |
| 44 | nR = len(Im) |
| 45 | nC = len(Re) |
| 46 | img = np.zeros((nR, nC), |
| 47 | dtype=np.uint8) |
| 48 | for i in range(nR): |
| 49 | for j in range(nC): |
| 50 | c = complex(Re[j],Im[i]) |
| 51 | img[i,j] = nIter(c,imax) |
| 52 | return img |
| 53 | |
| 54 | def main(): |
| 55 | imax = 255 |