home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ozsi 10
/
Ozsi_10_1998_Tide_Side_A.d64
/
frac.fern..._rtn
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
1KB
|
50 lines
10 dima(4),b(4),c(4),d(4),e(4),f(4),p(4)
20 data 4
30 data 0,0,0,.16,0,0,.01
40 data .2,-.26,.23,.22,0,1.6,.07
50 data -.15,.28,.26,.24,0,.44,.07
60 data .85,.04,-.04,.85,0,1.6,.85
70 read m
80 pt=0
90 for j=1 to m
100 read a(j),b(j),c(j),d(j),e(j),f(j),pk
110 pt=pt+pk
120 p(j)=pt
130 next j
140 gosub 500
150 xscale=25
160 yscale=16
170 xoffset=140
180 yoffset=10
190 x=0
200 y=0
210 n=0
220 pk=rnd(1)
230 if pk<=p(1) then k=1:goto 240
231 if pk<=p(2) then k=2:goto 240
232 if pk<=p(3) then k=3:goto 240
233 k=4
240 nx=a(k)*x+b(k)*y+e(k)
250 ny=c(k)*x+d(k)*y+f(k)
260 x=nx
270 y=ny
280 if n>10 then xx=x*xscale+xoffset:yy=y*yscale+yoffset:gosub 600
290 get a$:ifa$<>"" then goto 310
300 n=n+1:goto 220
310 get a$:ifa$="" then goto 310
320 poke 53272,20:poke 53265,27:poke 53280,14:print chr$(147)
330 end
500 rem** set up the graphics screen **
510 poke 53265,peek(53265)or32
520 poke 53272,peek(53272)or8
530 bm=8192
540 for i=bm to bm+7999:poke i,0:next i
550 for i=1024 to 2023:poke i,13:next i
560 poke 53280,13
570 return
600 rem** plot a point on the screen **
610 by=bm+320*int(yy/8)+8*int(xx/8)+(yyand7)
620 bt=7-(xx and 7)
630 poke by,peek(by)or(2^bt)
640 return