Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Brownian-tree/ZX-Spectrum-Basic/brownian-tree.basic
Normal file
16
Task/Brownian-tree/ZX-Spectrum-Basic/brownian-tree.basic
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
10 LET np=1000
|
||||
20 PAPER 0: INK 4: CLS
|
||||
30 PLOT 128,88
|
||||
40 FOR i=1 TO np
|
||||
50 GO SUB 1000
|
||||
60 IF NOT ((POINT (x+1,y+1)+POINT (x,y+1)+POINT (x+1,y)+POINT (x-1,y-1)+POINT (x-1,y)+POINT (x,y-1))=0) THEN GO TO 100
|
||||
70 LET x=x+RND*2-1: LET y=y+RND*2-1
|
||||
80 IF x<1 OR x>254 OR y<1 OR y>174 THEN GO SUB 1000
|
||||
90 GO TO 60
|
||||
100 PLOT x,y
|
||||
110 NEXT i
|
||||
120 STOP
|
||||
1000 REM Calculate new pos
|
||||
1010 LET x=RND*254
|
||||
1020 LET y=RND*174
|
||||
1030 RETURN
|
||||
Loading…
Add table
Add a link
Reference in a new issue