June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
16
Task/Fractal-tree/BASIC/fractal-tree-4.basic
Normal file
16
Task/Fractal-tree/BASIC/fractal-tree-4.basic
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
VDU 23,22,SizeX%;SizeY%;8,16,16,128
|
||||
|
||||
PROCbranch(SizeX%, 0, SizeY%/2, 90, Depth%)
|
||||
END
|
||||
|
||||
DEF PROCbranch(x1, y1, size, angle, depth%)
|
||||
LOCAL x2, y2
|
||||
x2 = x1 + size * COSRAD(angle)
|
||||
y2 = y1 + size * SINRAD(angle)
|
||||
VDU 23,23,depth%;0;0;0;
|
||||
LINE x1, y1, x2, y2
|
||||
IF depth% > 0 THEN
|
||||
PROCbranch(x2, y2, size * Scale, angle - Spread, depth% - 1)
|
||||
PROCbranch(x2, y2, size * Scale, angle + Spread, depth% - 1)
|
||||
ENDIF
|
||||
ENDPROC
|
||||
Loading…
Add table
Add a link
Reference in a new issue