SUBROUTINE CBFM (XL,YL,SIDEX,SIDEY,NITER,COL,MCPAX,MCPAY) C C COPYRIGHT (C) 1985-1992 BY ART MATRIX. ALL RIGHTS RESERVED. C IMPLICIT REAL*8 (A-H,O-Z) C INTEGER*2 COL(0:MCPAX,0:MCPAY) COMPLEX*16 Z,V,A,B,AA3,T,T2,T3 C C*********************************************************************** C*********************************************************************** C CALL DRVID ('FM ',102,1,2,5) C C*********************************************************************** C*********************************************************************** C SQRT3 = 3**.5D00 SQRT3M = -SQRT3 C ESC = 100.0 EPS = .000001 C C*********************************************************************** C*********************************************************************** C DO 2000 IY = 0,MCPAY C Y = YL + (IY*SIDEY)/MCPAY C CALL SHOWIY (10,IY,Y) C DO 1000 IX = 0,MCPAX C X = XL + (IX*SIDEX)/MCPAX C C*********************************************************************** C*********************************************************************** C T = DCMPLX(X,Y) C T3 = 3*T T2 = T*T A = (T2 + 1)/T3 B = 2*A*A*A + (T2 - 2)/T3 C AA3 = A*A*3 C C*********************************************************************** C*********************************************************************** C Z = -A C DO 400 I=1,NITER C Z = Z*Z*Z - AA3*Z + B C IF (DREAL(Z)*DREAL(Z) + IMAG(Z)*IMAG(Z) .GE. ESC ) GOTO 430 C V = Z - A IF (DREAL(V)*DREAL(V) + IMAG(V)*IMAG(V) .LE. EPS ) GOTO 420 C 400 CONTINUE C COL(IX,IY) = 0 GOTO 1000 C 420 COL(IX,IY) = -1 GOTO 1000 C 430 IF (DREAL(Z) .GE. 0) THEN IF (IMAG(Z) .GE. 0) THEN COL(IX,IY) = 1 + 5*I ELSE COL(IX,IY) = 4 + 5*I ENDIF ELSE ZIZR = IMAG(Z)/DREAL(Z) IF (ZIZR .LE. SQRT3M) THEN COL(IX,IY) = 1 + 5*I ELSEIF (ZIZR .GT. SQRT3) THEN COL(IX,IY) = 4 + 5*I ELSE COL(IX,IY) = 2 + 5*I ENDIF ENDIF C C*********************************************************************** C*********************************************************************** C 1000 CONTINUE C 2000 CONTINUE C RETURN END