dim z(3) dim c(2) print "Number of iterations?" input t open window 500,500 clear screen for y=1 to 250 c(2)=1*(y/100-2.5) for x=1 to 500 c(1)=1*(x/100-2.5) z(1)=0 z(2)=0 z(3)=0 d=0 if x=1 dot x,y if x=1 dot x,500-y for i=1 to t w=w+1 z(3)=z(1)^2-z(2)^2+c(1) z(2)=2*z(1)*z(2)+c(2) z(1)=z(3) d=z(1)^2+z(2)^2 if (d>4) break if (i=t) dot x,y if (i=t) dot x,500-y if (i=t) q=q+2 next i //color str$(i) + ",250," + str$(t-i+1) //str$(int(i*255)/t) color int((i*255)/(t+1)),0,0 //if i/2=int(i/2) then dot x,y:dot x,500-y:endif //if i/2=int(i/2) then fill rectangle x,y,x,y fill rectangle x,500-y,x,500-y //endif next x next y print w print q