gfxdemo1.prg ==2001== 10 rem ** 320x200x32col fractal(?) 20 rem ** 30 rem ** this is a little demonstration how to do a formula-based 40 rem ** computer graphic using the screen instructions of the 65 50 rem ** calculation will last about 20 minutes. basic is sloooow 60 rem ** coded for the c65 information page at 70 rem ** http://www.toxic-waste.de/c65/ 80 rem ** 90 rem ** contact me: michael@toxic-waste.de 100 rem 110 trap 330 : rem ** in case of error want text screen 120 graphic clr : rem ** initialize graphics 130 screen def 1,0,0,5 : rem ** define 320x200x5 graphics screen 140 screen open 1 : rem ** open it 150 for i=1 to 31 160 read a,b,c 170 palette 1,i,a,b,c 180 next i 190 screen set 1,1 : rem ** make screen 1 the view screen 200 scnclr 0 : rem ** clear screen with color 0 210 border 0 : rem ** set border color to 0 220 pen 0,15 230 char 15,2,2,2,2,"toxic waste" 240 char 15,20,1,1,2,"calculating 20 minutes" 250 for x=1 to 320 260 for y=1 to 190 270 c=(x*x+y*y)/600 : rem ** draw the fractal 280 pen 0,c 290 draw x,y 300 next y 310 next x 320 get a$:if a$="" goto 320 : rem ** wait for key press 330 screen close 1 : rem ** close graphic, get text screen 340 palette restore : rem ** restore normal system colors 350 border 6 : rem ** restore normal border color 360 end 370 data 1,0,1,3,0,3,5,0,5,7,0,7,9,0,9,11,0,11,13,0,13,15,0,15 380 data 15,0,13,15,0,11,15,0,9,15,0,7,15,0,5,15,0,3,15,0,1 390 data 13,0,3,11,0,5,9,0,7,7,0,9,5,0,11,3,0,13,1,0,15,0,0,13 400 data 0,0,11,0,0,9,0,0,7,0,0,5,0,0,3,0,0,1,0,0,0,0,0,0