diff --git a/samples/index.txt b/samples/index.txt index 16f487d..ba26ad9 100644 --- a/samples/index.txt +++ b/samples/index.txt @@ -40,6 +40,7 @@ sample.hacker Hacker Logo (markwstock) sample.loreswalk Random LoRes (John Melesky) sample.hireswalk Random HiRes (John Melesky) sample.sierpinski Sierpinski Triangles (Kevin Miller) +sample.sierpinski2 Sierpinski Triangles (Helen Edgar) sample.stringart String Art (Chris Heric) sample.paint Drawing Program (Brian Broker) sample.scribble Scribble (William Simms) diff --git a/samples/sample.sierpinski2.txt b/samples/sample.sierpinski2.txt new file mode 100644 index 0000000..5e64f02 --- /dev/null +++ b/samples/sample.sierpinski2.txt @@ -0,0 +1,17 @@ +10 Hgr +15 Hcolor = 3 +20 let xa=140 : let ya=0 +30 let xb=0 : let yb = 159 +40 let xc=279 : let yc = 159 +50 Hplot xa,ya : Hplot xb,yb : Hplot xc,yc +60 let x=INT(rnd(1)*40) : LET Y = INT(RND(1)*40) +70 HPLOT X,Y +80 D=(INT(RND(1)*3)) + 1 +85 PRINT D +90 ON D GOTO 100,200,300 +100 X=INT((X + XA)/2) : Y=INT((Y + YA)/2) +110 GOTO 70 +200 X=INT((X + XB)/2) : Y=INT((Y + YB)/2) +210 GOTO 70 +300 X=INT((X + XC)/2) : Y=INT((Y + YC)/2) +310 GOTO 70 \ No newline at end of file