Author Topic: Mandelbrot with Amstrad  (Read 3767 times)

0 Members and 1 Guest are viewing this topic.

Offline litwr

  • CPC664
  • ***
  • Posts: 143
  • Country: ru
    • lidovski's www page
  • Liked: 112
Mandelbrot with Amstrad
« on: 08:54, 05 October 16 »
The idea was imported from http://cbmandelbrot.blogspot.ru/  :D
I have just made a conversion for Amstrad CPC.

Amstrad CPC ROM Basic makes it for 5 hours 27 minutes and about 12 seconds.  It is much faster than any Commodore of 80s.
I'm aware about http://www.cpcwiki.eu/forum/programming/mandelbrot-in-one-basic-line/ but  this is a bit different.
BTW it is also a thread at C+4 forum about this subject, it also mentions the Fibonacci Sunflower demo - http://plus4world.powweb.com/forum/32712
Commodore Basic original text
Code: [Select]
   10 x=0:y=0:x2=0:y2=0:xy=0:r=0:j=0
   11 dimd(2,319),r(319),j(199):a=0:b=1:c=2
   12 r0=-1.9:r1=+0.5:dr=(r1-r0)/320:fors=0to319:r(s)=r0+dr*s:next
   13 j0=-0.10:j1=+0.95:dj=(j1-j0)/200:fort=0to199:j(199-t)=j0+dj*t:next
   14 n=30
   15 color0,1:color1,4:graphic 1:ti$="000000":scnclr
   16 fort=0to199:j=j(t):fors=0to319:r=r(s):x=r:y=j
   17 fori=1ton:x2=x*x:y2=y*y:ifx2+y2<4thenxy=x*y:x=x2-y2+r:y=2*xy+j:next
   18 d(c,s)=i:ifi<=nthen:draw 1,s,t
   19 ifs<2ort<2then28
   20 locate s-1,t-1:if rdot(2)=0then28
   21 m=d(b,s-1)
   22 ifd(b,s-2)<mandd(b,s)<mthen27
   23 ifd(a,s-2)<mandd(c,s)<mthen27
   24 ifd(c,s-2)<mandd(a,s)<mthen27
   25 ifd(a,s-1)<mandd(c,s-1)<mthen27
   26 goto28
   27 draw 0
   28 nexts:z=a:a=b:b=c:c=z:next:printti:clk$=ti$
   29 getkeya$:graphic0:printclk$
Amstrad CPC Basic text (I am not sure that it can't be made faster.)
Code: [Select]
   10 x=0:y=0:x2=0:y2=0:xy=0:r=0:j=0
   11 DIM d(2,319),r(319),j(199):a=0:b=1:c=2
   12 r0=-1.9:r1=.5:dr=(r1-r0)/320:FOR s%=0 to 319:r(s%)=r0+dr*s%:NEXT
   13 j0=-0.10:j1=.95:dj=(j1-j0)/200:FOR t%=0 to 199:j(199-t%)=j0+dj*t%:NEXT
   14 n=30
   15 MODE 1:time0=TIME
   16 FOR t%=0 to 199:j=j(t%):FOR s%=0 to 319:r=r(s%):x=r:y=j
   17 FOR i=1 to n:x2=x*x:y2=y*y:IF x2+y2<4 THEN xy=x*y:x=x2-y2+r:y=2*xy+j:NEXT
   18 d(c,s%)=i:IF i<=n THEN:PLOT s%+s%,400-t%-t%,1
   19 IF s%<2 or t%<2 THEN 28
   20 IF TEST(s%+s%-2,402-t%-t%)=0 THEN 28
   21 m=d(b,s%-1)
   22 IF d(b,s%-2)<m AND d(b,s%)<m THEN 27
   23 IF d(a,s%-2)<m AND d(c,s%)<m THEN 27
   24 IF d(c,s%-2)<m AND d(a,s%)<m THEN 27
   25 IF d(a,s%-1)<m AND d(c,s%-1)<m THEN 27
   26 GOTO 28
   27 PLOT s%+s%-2,402-t%-t%,0
   28 NEXT s%:z=a:a=b:b=c:c=z:NEXT:clk=(TIME-time0)/300:hours=int(clk/3600):mins=int(clk/60-hours*60)
   29 a$=INKEY$:IF a$="" THEN 29
   30 CLS:PRINT hours;mins;int(clk-hours*3600-mins*60)
« Last Edit: 07:03, 02 November 16 by litwr »

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.757
  • Country: es
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 670
Re: Mandelbrot with Amstrad
« Reply #1 on: 11:17, 05 October 16 »
Nice use of mode 2!


I would suggest using dither to create the illusion of a third color to improve the result.


I did that on the Dragon and the result is quite good!



Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.435
  • Country: dk
    • index.php?action=treasury
    • The Music Resource for the Indie Game Developer
  • Liked: 614
Re: Mandelbrot with Amstrad
« Reply #2 on: 16:49, 05 October 16 »
How long does it take to render?
I made a Mandelbrott BASIC listing as a kid too, and as far as I remember it took the CPC 4 days to draw the whole thing.
May not have been the smartest listing in the world though.
My eBook about experiencing the Amstrad CPC (and others) as a kid, will be released December 2017!!!
Please help me out by letting me know about your interest by voting in this poll! Thanks!!!

Offline HAL 6128

  • 464 Plus
  • *****
  • Posts: 382
  • Country: de
    • index.php?action=treasury
  • Liked: 155
Re: Mandelbrot with Amstrad
« Reply #3 on: 21:42, 05 October 16 »
Oh yeah! I remember myself too. When I programmed as a kid my listing it took the whole night and half of the day for rendering. I started the program before I had gone to bed and covered the monitor to prevent glimmering the whole room. After had been coming back from school the picture was finished. :)
...proudly supported Pentomino with GFX

Offline litwr

  • CPC664
  • ***
  • Posts: 143
  • Country: ru
    • lidovski's www page
  • Liked: 112
Re: Mandelbrot with Amstrad
« Reply #4 on: 22:52, 05 October 16 »
I did that on the Dragon and the result is quite good!
Dragon 32/64?  The result is impressive.  It is interesting to look at the code.  Is it Basic?
« Last Edit: 23:07, 05 October 16 by litwr »

Offline SRS

  • Supporter
  • 464 Plus
  • *
  • Posts: 436
  • Country: de
  • Schneider CPC464 - what else ?
  • Liked: 386
Re: Mandelbrot with Amstrad
« Reply #5 on: 23:20, 05 October 16 »
Well done :)

But: why monocolored in MODE 1 ?

I don't get why the very big (and slow) arrays are needed ? Maybe to late for me 20675-0 today ;)

Using 16 iterations per pixel, some y-symmetrics, four colors and saving 30 "empty" pixels left and right
a color mandel in 32 minutes.

using

Code: [Select]
10 MODE 1:time0=TIME
20 maxIteration = 16
30 px=70:py=0
40 FOR x0 = -1.6 TO 0.6 STEP 0.01
50 FOR y0 = -1 TO 0 STEP 0.01
60 x=0:y=0:iteration=0
70 x2=x*x:y2=y*y
80 WHILE (x2 + y2 <= (4) AND iteration < maxIteration)
90 xtemp = x2 - y2 + x0
100 y = 2 * x * y + y0
110 x = xtemp:iteration = iteration + 1
120 x2=x*x:y2=y*y:WEND
130 IF iteration<>maxIteration THEN c=iteration\4 ELSE c=0:GOTO 150
140 PLOT px,py,c:PLOT px,400-py,c
150 py=py+2
160 NEXT
170 px=px+2:py=0
180 NEXT:clk=(TIME-time0)/300:hours=INT(clk/3600):mins=INT(clk/60-hours*60)
190 a$=INKEY$:IF a$="" THEN 190
200 CLS:PRINT hours;mins;INT(clk-hours*3600-mins*60)
« Last Edit: 23:23, 05 October 16 by SRS »

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.757
  • Country: es
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 670
Re: Mandelbrot with Amstrad
« Reply #6 on: 00:00, 06 October 16 »
Dragon 32/64?  The result is impressive.  It is interesting to look at the code.  Is it Basic?


Sure!


Here you have my source code (the ASC file) and several nice screenshots.


It's a bit longer than the original code to support multiple screen resolutions, colors and dither (very much needed).


If you use the dither on mode 1, you should get pretty nice results.

Offline SRS

  • Supporter
  • 464 Plus
  • *
  • Posts: 436
  • Country: de
  • Schneider CPC464 - what else ?
  • Liked: 386
Re: Mandelbrot with Amstrad
« Reply #7 on: 16:05, 06 October 16 »
@robcfg:

Try this (ugly colors, I know)

Code: [Select]
10 REM K3 FRACTALS FOR THE DRAGON COMPUTER
20 REM BY ROBCFG WITH HELP OF HABI AND SYX
25 REM Patched to AMSTRAD CPC by SRS
30 GOSUB 430
40 FT=0:SM=0:PA=0:FX=0:F2=0:FY=0:NI=0:MI=0:C=0:X=0:Y=0
50 VM=&c000:RX=320:RY=400:MX=0:MY=0:DX=0:DY=0
60 PRINT"PLEASE CHOOSE A FRACTAL TYPE:":PRINT
70 PRINT"<1> MANDELBROT"
80 PRINT"<2> JULIA":PRINT
90 INPUT"FRACTAL TYPE";FT
100 GOSUB 430
110 PRINT "PLEASE CHOOSE A SCREEN MODE:":PRINT
120 PRINT"<1> 320X200 4 COLORS"
130 PRINT"<2> 640X200 2 COLORS":PRINT
140 INPUT"SCREEN MODE";SM:SM=SM+2:IF SM=4 THEN RX=640
150 GOSUB 430
160 PRINT"PLEASE CHOOSE A COLOR PALETTE:":PRINT
170 IF SM=4 THEN GOTO 230
180 REM -- 4 COLOR PALETTE --
190 PRINT"<1> RED,GREEN,YELLOW,BLUE"
200 PRINT"<2> ORANGE,BUFF,CYAN,MAGENTA":PRINT
210 GOTO 260
220 REM -- 2 COLOR PALETTE --
230 PRINT"<1> GREEN,BLACK"
240 PRINT"<2> BUFF,BLACK"
250 IF SM<>4 THEN PRINT ELSE PRINT"<3> NTSC ARTIFACTS":PRINT
260 INPUT"COLOR PALETTE";PA:PA=PA-1:PRINT
270 GOSUB 430
280 IF FT=1 THEN PRINT"FOR FULL MANDELBROT USE":PRINT"X1=-2.4,X2=1.04,Y1=-1.3"
290 IF FT=2 THEN PRINT"FOR FULL JULIA USE":PRINT"X1=-1.666,X2=1.666,Y1=-1.25"
300 PRINT
310 PRINT"ENTER X1 COORDINATE:":INPUT FX
320 PRINT"ENTER X2 COORDINATE:":INPUT F2
330 PRINT"ENTER Y1 COORDINATE:":INPUT FY
340 PRINT"ENTER ITERATIONS:":INPUT NI:MI=NI-1:GOSUB 430
350 DX=F2-FX:DY=DX*(RY/RX):IF SM=3 THEN DY=DY/2
360 PRINT:PRINT"WHEN THE FRACTAL IS FINISHED,"
370 PRINT"PRESS A KEY TO CONTINUE.":PRINT
380 PRINT"YOU'LL BE ASKED TO SAVE":PRINT"YOUR IMAGE."
390 PRINT:PRINT"PRESS A KEY TO START.":GOSUB 460
400 MODE SM-2:IF PA=0 THEN ink 0,6:ink 1,18:ink 2,26:ink 3,1 ELSE ink 0,12:ink 1,13:ink 2,4:ink 3,16
410 CLS
420 ON FT GOTO 470,820
430 REM -- CLEAR SCREEN AND SHOW BANNER --
440 CLS:PRINT"      * K3 FRACTALS V1.0 *":PRINT:RETURN
450 REM -- WAIT FOR A KEY PRESS
460 IF INKEY$="" THEN GOTO 460 ELSE RETURN
470 REM -- MANDELBROT --
480 E=FY
490 Y=0:REM FOR Y=0 TO MY
500 D=FX
510 X=0:REM FOR X=0 TO MX
520 Z=0:I=0:A=0:z2=0:i2=0
530 S=(Z2)-(I2)+D:R=(2*I*Z)+E:Z=S:I=R:A=A+1:z2=z*z:i2=i*i
540 IF A<MI AND (Z2+I2)<4 THEN GOTO 530
550 IF SM=4 THEN C=0 ELSE C=3
560 IF A=MI THEN GOTO 760:REM EARLY OUT
570 IF SM=3 THEN GOTO 670:REM 4 COLOR PALETTE
580 IF PA=2 THEN GOTO 610
590 IF (A AND 1)=0 THEN GOSUB 1190 ELSE GOSUB 1210
600 GOTO 760
610 J=A AND 3
620 on J GOSUB 1190,1240,1190,1270
660 GOTO 760
670 K=(A/8)-INT(A/8)
680 J=K*8
690 ON J GOSUB 1300,1330,1350,1380,1400,1430,1450
760 IF SM=3 THEN plot X*2,Y,C ELSE plot X,Y,C
770 D=D+DX/RX:REM D=D+0.013437
780 X=X+1:IF X<RX THEN GOTO 520:REM NEXT X
790 E=E+DY/RY:REM E=E+0.013541
800 Y=Y+2:IF Y<RY THEN GOTO 500:REM NEXT Y
810 GOSUB 450:GOTO 1480
820 REM -- JULIA --
830 CR=-0.4:CI=0.6:MX=RX-1:MY=RY-1
840 E=FY
850 Y=0:REM FOR Y=0 TO MY
860 D=FX
870 X=0:REM FOR X=0 TO MX
880 Z=D:I=E:A=0:z2=0:i2=0
890 S=(Z2)-(I2)+CR:R=(2*I*Z)+CI:Z=S:I=R:A=A+1:i2=i*i:z2=z*z
900 IF A<MI AND (Z2+I2)<4 THEN GOTO 890
910 IF SM=4 THEN C=0 ELSE C=3
920 IF A=MI THEN GOTO 1120:REM EARLY OUT
930 IF SM=3 THEN GOTO 1030
940 IF PA=2 THEN GOTO 970
950 IF (A AND 1)=0 THEN GOSUB 1190 ELSE GOSUB 1210
960 GOTO 1120
970 J=A AND 3
980 ON J GOSUB 1190,1240,1190,1270
1020 GOTO 1120
1030 K=(A/8)-INT(A/8)
1040 J=K*8
1050 ON J GOSUB 1300,1330,1350,1380,1400,1430,1450
1120 IF SM=3 THEN plot X*2,Y,C ELSE plot X,Y,C
1130 D=D+DX/RX
1140 X=X+1:IF X<RX THEN GOTO 880:REM NEXT X
1150 E=E+DY/RY
1160 Y=Y+2:IF Y<RY THEN GOTO 860:REM NEXT Y
1170 GOSUB 450:GOTO 1480
1180 REM -- COLOR SELECTION AND DITHERING --
1190 REM -- WHITE STRIP --
1200 C=1:RETURN
1210 REM -- WHITE-BLACK PATTERN --
1220 IF (X AND 1)=(Y AND 1) THEN C=1
1230 RETURN
1240 REM -- WHITE-BLACK NTSC LINES --
1250 IF (X AND 1)=0 THEN C=1
1260 RETURN
1270 REM -- BLACK-WHITE NTSC LINES --
1280 IF (X AND 1)<>0 THEN C=1
1290 RETURN
1300 REM -- GREEN-YELLOW PATTERN --
1310 IF (X AND 1)=(Y AND 1) THEN C=3 ELSE C=1
1320 RETURN
1330 REM -- YELLOW --
1340 C=1:RETURN
1350 REM -- YELLOW-RED PATTERN --
1360 IF (X AND 1)=(Y AND 1) THEN C=1 ELSE C=2
1370 RETURN
1380 REM -- RED --
1390 C=2:RETURN
1400 REM -- RED-BLUE PATTERN --
1410 IF (X AND 1)=(Y AND 1) THEN C=2 ELSE C=0
1420 RETURN
1430 REM -- BLUE --
1440 C=0:RETURN
1450 REM -- BLUE-GREEN PATTERN --
1460 IF (X AND 1)=(Y AND 1) THEN C=0 ELSE C=3
1470 RETURN
1480 REM -- SAVE IMAGE MENU --
1600 IF FT=1 THEN SAVE"MANDELBR",b,VM,&3fff,VM ELSE SAVE"JULIA",b,VM,&3fff,VM
1610 GOTO 10



Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.757
  • Country: es
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 670
Re: Mandelbrot with Amstrad
« Reply #8 on: 18:32, 20 October 16 »
I hope you didn't think I forgot about you  ;)


I managed to fix the code and Mandelbrot renders quite good on mode 1 and mode 2:


20808-020810-1


Here's the code:
Code: [Select]
10 REM K3 FRACTALS FOR THE DRAGON COMPUTER
20 REM BY ROBCFG WITH HELP OF HABI AND SYX
25 REM Patched to AMSTRAD CPC by SRS
30 GOSUB 430
40 FT=0:SM=0:PA=0:FX=0:F2=0:FY=0:NI=0:MI=0:C=0:X=0:Y=0
50 VM=&c000:RX=320:RY=200:MX=0:MY=0:DX=0:DY=0
60 PRINT"PLEASE CHOOSE A FRACTAL TYPE:":PRINT
70 PRINT"<1> MANDELBROT"
80 PRINT"<2> JULIA":PRINT
90 INPUT"FRACTAL TYPE";FT
100 GOSUB 430
110 PRINT "PLEASE CHOOSE A SCREEN MODE:":PRINT
120 PRINT"<1> 320X200 4 COLORS"
130 PRINT"<2> 640X200 2 COLORS":PRINT
140 INPUT"SCREEN MODE";SM:SM=SM+2:IF SM=4 THEN RX=640
150 GOSUB 430
160 PRINT"PLEASE CHOOSE A COLOR PALETTE:":PRINT
170 IF SM=4 THEN GOTO 230
180 REM -- 4 COLOR PALETTE --
190 PRINT"<1> RED,GREEN,YELLOW,BLUE"
200 PRINT"<2> ORANGE,BUFF,CYAN,MAGENTA":PRINT
210 GOTO 260
220 REM -- 2 COLOR PALETTE --
230 PRINT"<1> GREEN,BLACK"
240 PRINT"<2> BUFF,BLACK"
250 IF SM<>4 THEN PRINT ELSE PRINT"<3> NTSC ARTIFACTS":PRINT
260 INPUT"COLOR PALETTE";PA:PA=PA-1:PRINT
270 GOSUB 430
280 IF FT=1 THEN PRINT"FOR FULL MANDELBROT USE":PRINT"X1=-2.4,X2=1.04,Y1=-1.3"
290 IF FT=2 THEN PRINT"FOR FULL JULIA USE":PRINT"X1=-1.666,X2=1.666,Y1=-1.25"
300 PRINT
310 PRINT"ENTER X1 COORDINATE:":INPUT FX
320 PRINT"ENTER X2 COORDINATE:":INPUT F2
330 PRINT"ENTER Y1 COORDINATE:":INPUT FY
340 PRINT"ENTER ITERATIONS:":INPUT NI:MI=NI-1:GOSUB 430
350 DX=F2-FX:DY=DX*(RY/RX)*2:IF SM=3 THEN DY=DY/2
360 PRINT:PRINT"WHEN THE FRACTAL IS FINISHED,"
370 PRINT"PRESS A KEY TO CONTINUE.":PRINT
380 PRINT"YOU'LL BE ASKED TO SAVE":PRINT"YOUR IMAGE."
390 PRINT:PRINT"PRESS A KEY TO START.":GOSUB 460
400 MODE SM-2:IF PA=0 THEN ink 0,6:ink 1,18:ink 2,26:ink 3,1 ELSE ink 0,12:ink 1,13:ink 2,4:ink 3,16
410 CLS
420 ON FT GOTO 470,820
430 REM -- CLEAR SCREEN AND SHOW BANNER --
440 CLS:PRINT"      * K3 FRACTALS V1.0 *":PRINT:RETURN
450 REM -- WAIT FOR A KEY PRESS
460 IF INKEY$="" THEN GOTO 460 ELSE RETURN
470 REM -- MANDELBROT --
480 E=FY
490 Y=0:REM FOR Y=0 TO MY
500 D=FX
510 X=0:REM FOR X=0 TO MX
520 Z=0:I=0:A=0:z2=0:i2=0
530 S=(Z2)-(I2)+D:R=(2*I*Z)+E:Z=S:I=R:A=A+1:z2=z*z:i2=i*i
540 IF A<MI AND (Z2+I2)<4 THEN GOTO 530
550 IF SM=4 THEN C=0 ELSE C=3
560 IF A=MI THEN GOTO 760:REM EARLY OUT
570 IF SM=3 THEN GOTO 670:REM 4 COLOR PALETTE
580 IF PA=2 THEN GOTO 610
590 IF (A AND 1)=0 THEN GOSUB 1190 ELSE GOSUB 1210
600 GOTO 760
610 J=A AND 3
620 on J GOSUB 1190,1240,1190,1270
660 GOTO 760
670 K=(A/8)-INT(A/8)
680 J=K*8
690 ON J GOSUB 1300,1330,1350,1380,1400,1430,1450
760 IF SM=3 THEN plot X*2,Y*2,C ELSE plot X,Y*2,C
770 D=D+DX/RX:REM D=D+0.013437
780 X=X+1:IF X<RX THEN GOTO 520:REM NEXT X
790 E=E+DY/RY:REM E=E+0.013541
800 Y=Y+1:IF Y<RY THEN GOTO 500:REM NEXT Y
810 GOSUB 450:GOTO 1480
820 REM -- JULIA --
830 CR=-0.4:CI=0.6:MX=RX-1:MY=RY-1
840 E=FY
850 Y=0:REM FOR Y=0 TO MY
860 D=FX
870 X=0:REM FOR X=0 TO MX
880 Z=D:I=E:A=0:z2=0:i2=0
890 S=(Z2)-(I2)+CR:R=(2*I*Z)+CI:Z=S:I=R:A=A+1:i2=i*i:z2=z*z
900 IF A<MI AND (Z2+I2)<4 THEN GOTO 890
910 IF SM=4 THEN C=0 ELSE C=3
920 IF A=MI THEN GOTO 1120:REM EARLY OUT
930 IF SM=3 THEN GOTO 1030
940 IF PA=2 THEN GOTO 970
950 IF (A AND 1)=0 THEN GOSUB 1190 ELSE GOSUB 1210
960 GOTO 1120
970 J=A AND 3
980 ON J GOSUB 1190,1240,1190,1270
1020 GOTO 1120
1030 K=(A/8)-INT(A/8)
1040 J=K*8
1050 ON J GOSUB 1300,1330,1350,1380,1400,1430,1450
1120 IF SM=3 THEN plot X*2,Y*2,C ELSE plot X,Y*2,C
1130 D=D+DX/RX
1140 X=X+1:IF X<RX THEN GOTO 880:REM NEXT X
1150 E=E+DY/RY
1160 Y=Y+1:IF Y<RY THEN GOTO 860:REM NEXT Y
1170 GOSUB 450:GOTO 1480
1180 REM -- COLOR SELECTION AND DITHERING --
1190 REM -- WHITE STRIP --
1200 C=1:RETURN
1210 REM -- WHITE-BLACK PATTERN --
1220 IF (X AND 1)=(Y AND 1) THEN C=1
1230 RETURN
1240 REM -- WHITE-BLACK NTSC LINES --
1250 IF (X AND 1)=0 THEN C=1
1260 RETURN
1270 REM -- BLACK-WHITE NTSC LINES --
1280 IF (X AND 1)<>0 THEN C=1
1290 RETURN
1300 REM -- GREEN-YELLOW PATTERN --
1310 IF (X AND 1)=(Y AND 1) THEN C=3 ELSE C=1
1320 RETURN
1330 REM -- YELLOW --
1340 C=1:RETURN
1350 REM -- YELLOW-RED PATTERN --
1360 IF (X AND 1)=(Y AND 1) THEN C=1 ELSE C=2
1370 RETURN
1380 REM -- RED --
1390 C=2:RETURN
1400 REM -- RED-BLUE PATTERN --
1410 IF (X AND 1)=(Y AND 1) THEN C=2 ELSE C=0
1420 RETURN
1430 REM -- BLUE --
1440 C=0:RETURN
1450 REM -- BLUE-GREEN PATTERN --
1460 IF (X AND 1)=(Y AND 1) THEN C=0 ELSE C=3
1470 RETURN
1480 REM -- SAVE IMAGE MENU --
1600 IF FT=1 THEN SAVE"MANDELBR",b,VM,&3fff,VM ELSE SAVE"JULIA",b,VM,&3fff,VM
1610 GOTO 10


Julia render seems to work ok, but there is a mistake in the formula computation. I'll try to fix it too.

Offline SRS

  • Supporter
  • 464 Plus
  • *
  • Posts: 436
  • Country: de
  • Schneider CPC464 - what else ?
  • Liked: 386
Re: Mandelbrot with Amstrad
« Reply #9 on: 21:58, 20 October 16 »
Very nice :)

And it uses a new MODE for CPC - the CGA1.

C
olorfulGrafikAdvanced Mode 1 with 320x200 Pixel in 8 Colors :)  instead of 4. Ha ! In BASIC.