10REM RECURSION TRIAN
GLE
20REM BY
30REM Ian T. Roxborough
(ELITE)
40REM
50:
60REM Lines 80 - 90 The quardinates o
f the corners of the triangles.
70:
80DIM XP(3):DIM YP(3)
90XP(1)=0:YP(1)=1023:XP(2)=1279:YP(2)
=1023:XP(3)=640:YP(3)=0
100MODE0
110:
120REM Lines 130 - 190 Choose a corner
of triangle at randon and move half way
to it. REPEAT this UNTIL the sp
ace bar is pressed.
130:
140REPEAT
150C=RND(3)
160gcX=((gcX-XP(C))/2)+XP(C)
170gcY=((gcY-YP(C))/2)+YP(C)
180MOVE gcX,gcY:DRAW gcX,gcY
190UNTIL INKEY-99
200END
210:
220REM XP(C) and YP(C) are the quardin
ates of the corners of the triangle.
230REM gcY and gcX are the quardinates
of the graphics cursor.
1000:
1010:
1020:
1030:
1040REM This programme was written to d
emostrate how simple fractals really
1050REM are. It is possible to compact
this procgramme into as little as
1060REM two lines.
1070:
1080REM Please note that this pragramme
is my own work. It is based on the
1090REM recursion triangle from one of
the Equanox series.
1100:
1110REM To ALL PROGRAMMERS why don't YO
U start using REM statments
1120REM (that is if don't already) to e
xplain your programme, so that
1130REM other programmers can interpret
your work of art at a glance.