include "window.inc"
window "New tonsil bread",800,600,1

single x,y,zx,zy,cx,cy,tmp, sys MaxIter=570,zoom=150,Iter 

ClsColor 255,255,255
For y=0 To Height
    For x=0 To Width
        zx=0
        zy=0
        cx= (x-400)/zoom	
        cy= (y-300)/zoom
        Iter = MaxIter
	while zx * zx + zy * zy < 4 && iter > 0 
              tmp = zx * zx - zy * zy + cX
              zy = 2.0 * zx * zy + cY
              zx = tmp
              iter--
	wend      
     ColorHLS 128,Iter or (Iter << 8),200
     'ColorHLS 128,230,Iter or (Iter << 8)
     Poke x,y, cHLS.h,cHLS.l,cHLS.s 
  Next
Next
Pause
WinEnd
