49£®¡¡ ÔÚMandelbrot ÖбÜÃâ´¿º¯Êý |
k0 = 0
FORALL ( i=1:n, j=1:m )
x(i,j) = CMPLX((i-1)*1.0/(n-1),(j-1)*1.0/(m-1))
k(i,j) = 0
xtmp(i,j) = 0
mask(i,j) = .TURE.
END FORALL
DO WHILE (ANY(mask(1:n,1:m)) .AND. k0<1000)
FORALL ( i=1:n, j=1:m, mask(i,j))
xtmp(i,j) = xtmp(i,j)*xtmp(i,j)-x(i,j)
k(i,j) = k(i,j) + 1
mask(i,j) = ABS(xtmp(i,j))<2.0
END FORALL
k0 = k0 + 1
END DO
Copyright: NPACT |