OPTION ARITHMETIC NATIVE
DECLARE EXTERNAL NUMERIC J.a,J.b,J.dx,J.h,J.dy
LET a=-.747
LET b= .094
LET left = -1.6                                    
LET right = 1.6                                   
LET h = (right - left)             
SET WINDOW left,right,-h/2,h/2
DRAW axes    
ASK PIXEL SIZE(left,-h/2;right,h/2) px,py
LET px=px-1
LET py=py-1
LET dx=(right-left)/px/8
LET dy=h/py/8
SET POINT STYLE 1
call J.Julia(left,right)
end
MODULE J
MODULE OPTION ARITHMETIC NATIVE
PUBLIC NUMERIC a,b,dx,h,dy
EXTERNAL SUB Julia(xl,xr)
   FOR u= xl TO xr step dx
      FOR v = -h/2 to h/2 step dy
         LET x1 = u                                
         LET y1 = v                                
         FOR n = 1 TO 1000                                            
            LET x = x1                           
            LET y = y1                           
            LET x1 = x*x - y*y + a       
            LET y1 = 2 * x * y + b 
            IF x1^2+y1^2>4 THEN EXIT FOR       
         NEXT n                                  
         IF n>1000 THEN PLOT POINTS: u,v
      NEXT v                                      
   NEXT u                                        
END sub
END module

