mandel1.prg ==2001== 10 n%=0:nm%=0:x=0:y=0:r=0:i=0:d=0:v=0:u=0:a=0:b=0:da=0:db=0 20 iu=0:io=0:ru=0:ro=0:f1%=1:f2%=1:f3%=1:f4%=1:xr=0:yi=0 30 a$="":b$="":graphic clr 40 screen def 1,0,0,7 50 screen open 1 60 rem ********************************* 70 rem * * 80 rem * programm zur grafischen * 90 rem * darstellung von * 100 rem * * 110 rem *m a n d e l b r o t m e n g e n* 120 rem * * 130 rem * heimo ponnath hamburg 1985 * 140 rem * * 150 rem * slightly modified by txw for * 160 rem * running this on the cbm c65 * 170 rem * * 180 rem * best start with the following * 190 rem * values for ru,ro,iu and io: * 200 rem * -2,0.5,-1.25,1.25 * 210 rem * * 220 rem * do not forget to alter lines * 230 rem * 720 and 730 to give the right * 240 rem * unit number parameter for the * 250 rem * bsave command. * 260 rem * * 270 rem * you can load the files "bank0"* 280 rem * and "bank1" later using the * 290 rem * bload command with the follow-* 300 rem * ing basic v10 program: * 310 rem * * 320 rem * 10 graphic clr * 330 rem * 20 screen def 1,0,0,5 * 340 rem * 30 screen open 1 * 350 rem * 40 bload "bank0",p49152,b0,u8 * 360 rem * 50 bload "bank1",p49152,b0,u8 * 370 rem * 60 screen set 1,1 * 380 rem * * 390 rem ********************************* 400 print:print:print:printchr$(18)"mandelbrotmengen als grafik"chr$(146) 410 print:print:print"parameter der gaussebene:":input"ru,ro,iu,io=";ru,ro,iu,io 420 print:print"komplexe variable (normal 0,0)":input"x,y=";xr,yi 430 print:print"would you like to save the finished picture as a 2-filer" 440 print"(screenmem bank0 c000-ffff and bank1 c000-ffff) (y/n)":input ant$ 450 nm%=45 460 print:print:print"now this will take a while..even on c65! :-)" 470 sleep2 480 screen set 1,1:scnclr 0 490 border 0 500 restore 510 for i=1 to 46 520 read a,b,c 530 palette 1,i,a,b,c 540 next i 550 da=(ro-ru)/159:db=(io-iu)/199 560 b=iu-db 570 foru=0to199 : rem 199 580 b=b+db:a=ru-da 590 forv=0to159 : rem 159 600 a=a+da 610 n%=0:r=xr:i=yi:d=0 620 do while d<4 630 x=r:y=i 640 r=x*x-y*y+a:i=2*x*y+b:d=r*r+i*i 650 n%=n%+1 660 ifn%=nm%thenexit 670 loop 680 ifn%=nm%thenpen0,0:drawv,u:else pen0,n%+1:drawv,u 690 nextv:nextu 700 get a$:ifa$="" then goto 700 710 if ant$<>"y" then goto 740 720 bsave "cank0",p49152 to p65535,b0,u10 730 bsave "cank1",p49152 to p65535,b1,u10 740 screen close 1:end 750 data 0,0,0,1,0,1,2,0,2,3,0,3,4,0,4,5,0,5,6,0,6,7,0,7,8,0,8,9,0,9 760 data 10,0,10,11,0,11,12,0,12,13,0,13,14,0,14,15,0,15,15,0,14 770 data 15,0,13,15,0,12,15,0,11,15,0,10,15,0,9,15,0,8,15,0,7,15,0,6 780 data 15,0,5,15,0,4,15,0,3,15,0,2,15,0,1,15,0,0,15,1,0,15,2,0,15,3,0 790 data 15,4,0,15,5,0,15,6,0,15,7,0,15,8,0,15,9,0,15,10,0,15,11,0 800 data 15,12,0,15,13,0,15,14,0,15,15,0