05-19-2021, 09:02 PM
Here is a little Mandelbrot I wrote on the ZX Spectrum years ago, and just added a bit of colour so it looks better on the calc. It will save itself if you have the patience to let it finish.
Code:
EXPORT mand()
BEGIN
LOCAL a,b,i,h,q,v,w;
LOCAL x,y,t;
RECT();
i:=20;
FOR b FROM 0 TO 240 DO
FOR a FROM 0 TO 320 DO
h:=a/120-1.7;
v:=b/120-1;
x:=h;
y:=v;
q:=0;
t:=0;
REPEAT
t:=t+1;
w:=x*x-y*y;
IF (x*x+y*y)>4 THEN BREAK(1); END;
IF q>=i THEN PIXON_P(a,b,0); BREAK(1); END;
y:=2*x*y+v;
x:=w+h;
q:=q+1;
PIXON_P(a,b,q*8000);
UNTIL 0;
END;
END;
AFiles("mandel2.png"):=G0;
END;