I was just playing with QL and SBasic, but the result, I think, looks nice.
Mandelbrot fractal on QL
- vanpeebles
- Commissario Pebbli
- Posts: 2852
- Joined: Sat Nov 20, 2010 7:13 pm
- Location: North East UK
-
- RWAP Master
- Posts: 2893
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: Mandelbrot fractal on QL
That reminds me about my own Quick Mandelbrot - I remember spending hours / days trying to eke every last ounce of speed out of the machine code! 

Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
Re: Mandelbrot fractal on QL
I don't have Quick Mandelbrot.
This one is much simpler.
First, the "darn *language!*
pre-calc":
(Sequence on this video was calculated in one day.)
(Generates infinitely screenshots, step size is a% - value of 10 I used is very small.)
And the player:
(can be played directly from floppy, but it will be not so smooth due to head movements.
With 4 MB of RAM, whole ED, i.e. 2.8 MB disk, fits into RAM1_ with no problem.)
max% is the number of screeshots saved on disk.
This one is much simpler.
First, the "darn *language!*

(Sequence on this video was calculated in one day.)
Code: Select all
10 sizex%=366:sizey%=256
20 maxiter%=256
30 MODE 8:WINDOW #1,sizey%*2,sizey%,0,0
40 SCALE sizey%,0,0
45 a%=10
50 FOR x%=0 TO sizex%
60 xi=x%/a%-2
70 FOR y%=0 TO sizey%/2
80 yi=y%/a%
90 x=0:y=0
100 FOR i%=1 TO maxiter%
110 IF x*x+y*y>4 THEN EXIT i%
120 xt=xi+x*x-y*y
130 y=yi+2*x*y
140 x=xt
150 END FOR i%
160 IF i%>maxiter% THEN LET i%=0
170 INK i% MOD 256: POINT x%,y%+sizey%/2,x%,sizey%/2-y%
180 NEXT y%
190 NEXT x%
195 SBYTES "flp1_"&(a%/10),$20000,$8000
200 a%=a%+10:GO TO 50
And the player:
(can be played directly from floppy, but it will be not so smooth due to head movements.
With 4 MB of RAM, whole ED, i.e. 2.8 MB disk, fits into RAM1_ with no problem.)
Code: Select all
50 max%=86
60 FOR a%=1 TO max%
70 AT 10,15:PRINT a%
80 COPY "flp1_"&a% TO "ram1_"&a%
90 NEXT a%
------------ this copied files to RAMdisk
100 max%=86
110 FOR a%=1 TO max%
120 LBYTES "ram1_"&a%,$20000
130 PAUSE 5 : REMark alter to change speed
140 NEXT a%
150 GO TO 110