Sub PLOTZ(X#, Y#, i#)  

    
    PLOTX# = X# * 10
    PLOTY# = Y# * 10
    
    PLOTX# = PLOTX# - 8
    PLOTY# = PLOTY# + 7
        
     
        
    Form1.PSet (-PLOTX# + 11, PLOTY# + 7), (i# * 32)

End Sub

Sub CALCZ(A#, B#, X#, Y#, i#)
    
    i# = 1
    temp1# = 0
    temp2# = 0
  
    Do While (temp1# <= 2) And (temp2# <= 2) And i# < (256)
    
    temp1# = (A# * A#) - (B# * B#) - X#
    
    temp2# = (2 * A# * B#)
    
       
    i# = i# + (i#)
    
    A# = temp1# - X#
    B# = temp2# - Y#
        
    Loop
       
      
     Call PLOTZ(X#, Y#, i#)
     
 
      
End Sub

Sub CONVERT(X#, Y#, i#, A#, B#)
    A# = X#
    B# = Y#
    Call CALCZ(A#, B#, X#, Y#, i#)
End Sub




Private Sub Form_Click()
'BY JMAC
'TODAY IS APRIL 24 2007


i# = 1


Open "C:\FRACTAL.txt" For Input As #1

'For good resolution
'use -1.5 for xmin and ymin
'use 1.52 for xmax and ymax
'your steps should be .001
'

Input #1, xmin#
Input #1, xmax#
Input #1, xstep#
Input #1, ymin#
Input #1, ymax#
Input #1, ystep#
Close #1


For X# = xmin# To xmax# Step xstep#
    For Y# = ymin# To ymax# Step ystep#
    i# = 1
    Call CONVERT(X#, Y#, i#, A#, B#)
    Next Y#
Next X#
End Sub


    Source: geocities.com/troop_1515/code

               ( geocities.com/troop_1515)