Program JuliaX1.bas

BackColor 30

ForeColor 33

CLS

R% = 10: Mx% = 400: My% = 400

INPUT "numits = (50) ", numits%

INPUT "a = (-1.7), b = (-1.7), c= (1.7), d = (1.7) ",a, b, c, d

INPUT "x¡ = (.885) , y¡ = (0) ", x0, y0

BackColor 30

CLS

FOR p% = 1 TO Mx%

FOR q% = 1 TO My%

K=a+(c-a)*p%/Mx%: L=b+(d-b)*q%/My%

x =K: y=L

FOR n% = 1 TO numits%

xx=x^2-y^2-x0

yy=2*x*y-y0

x=xx: y=yy

IF x^2+y^2 > R% THEN

ForeColor (2*n%+1)*33

PSET(p%+80, q%+10), 33: n%=numits%

END IF

IF INKEY$ <>"" THEN GOTO esc

NEXT n%: NEXT q%: NEXT p%

LOCATE 1,1: INPUT Z

esc:

END