Mandelbrot Red by Peter

        Made with NaaLaa6

 

 

 set window 16,16,640,480
set redraw off

visible:
a2#; b2#; z#; x2#; y2#

set caret 200,100
wln " WAIT A MOMENT..."
redraw
 
lx# = 3.0/640.0
ly# = 2.0/480.0
for x=0 to 639
for y=0 to 479
    a# = 0.0
    b# = 0.0
    c = 0
    x2 = lx*float(x)-2.0
    y2 = ly*float(y)-1.0
    while c<50
       a2# = a*a-b*b
       b2# = 2.0*a*b
       a = a2+x2
       b = b2+y2
       z = a*a+b*b
       if z >=4.0 then break
       c = c+1
    wend 
    if c=50
       set color 0,0,0  
       set pixel x,y
    elseif c < 17
       set color 254 - ((17-c)*3), 0, 0  
       set pixel x,y
    elseif c < 33
       set color 245, ((c-16)*16)-16, 0
       set pixel x,y
    else
       set color 641 -(c*12), 245, ((c-32)*15)
       set pixel x,y
    endif
next 
next

redraw
wait keydown


 

Make a free website with Yola