home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d9xx
/
d969
/
ace.lha
/
ACE
/
ACE-2.0.lha
/
PRGS.lha
/
Fractals
/
sierp.b
< prev
Wrap
Text File
|
1994-01-10
|
467b
|
37 lines
'...Sierpinski Triangle
screen 1,320,200,1,1
palette 0,0,0,0
palette 1,1,1,1
color 1,0
cls
randomize timer
'...Triangle corners...
dim xx%(4),yy%(4)
for i=1 to 3
read xx%(i),yy%(i)
next
data 70,20,250,20,160,190
'..initial x,y
X%=160
Y%=20
while not mouse(0)
posn%=INT(RND*3.0) + 1
'..arithmetic right shift is
'..faster than integer division
X% = shr((X% + xx%(posn%)),1&)
Y% = shr((Y% + yy%(posn%)),1&)
PSET (X%,Y%)
wend
screen close 1
end