Posted By
 MMS on 2024-04-04 15:30:51
 | Re: Simple but nice BASIC code examples
Aaaah, thank you @George, a nice Mandelbrot. Fractals were my thesis work at the university. I like fractals 
Herewith I attach the slightly modified version of the above 64'er program from G.Paret, the code produced a more familiar shape with other parameters 
UPADTE 04.03: I agree with the comment I received the border would llok better in black. Very easy on 264 machines :-)
Up the Mandrels! 
The code (I copied two of your "best practices" graphic 0 after drawing; use a "run" after the code, so it can run at once after copied just by pressing an ENTER):
10 graphic3,1:color0,1:color1,1: 20 color1,6,4:color2,6,6: color3,6,1:color4,1:rem recolor 30 xm=105:ym=105:xc=1:yc=0:T=20:S=60 35 xl=-0.15:xr=0.26:yo=0.47:yu=0.9 40 dx=(xr-xl)/xm:dy=(yu-yo)/ym 50 for n=0 to ym:y1=yo+n*dy:for m=0 to xm: x=xl+m*dx:y=y1:k=0 60 x2=x*x:y2=y*y:y=2*x*y-yc:x=x2-y2-xc:k=k+1 65 if (k < t) and (x2+y2 < s) then goto 60 70 u=m+53-n/2:u1=u+1:v=n+80:v1=v-3*(k-1) 75 draw3,u,v to u,v1:draw2,u1,v to u1,v1:draw1,u,v1 to u1,v1 80 next:next 90 getkey a$ 100 graphic0,1 run
how it looks like (updated to have black border):
 |