forked from inexorabletash/jslogo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
examples.txt
53 lines (49 loc) · 1009 Bytes
/
examples.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
to star
repeat 5 [ fd 100 rt 144 ]
end
clearscreen
star
to square :length
repeat 4 [ fd :length rt 90 ]
end
to randomcolor
setcolor pick [ red orange yellow green blue violet ]
end
clearscreen
repeat 36 [ randomcolor square random 200 rt 10 ]
clearscreen window hideturtle
repeat 144 [
setlabelheight repcount
penup
fd repcount * repcount / 30
label "Logo
bk repcount * repcount / 30
pendown
rt 10
wait 5
]
showturtle
to tree :size
if :size < 5 [forward :size back :size stop]
forward :size/3
left 30 tree :size*2/3 right 30
forward :size/6
right 25 tree :size/2 left 25
forward :size/3
right 25 tree :size/2 left 25
forward :size/6
back :size
end
clearscreen
tree 150
to fern :size :sign
if :size < 1 [ stop ]
fd :size
rt 70 * :sign fern :size * 0.5 :sign * -1 lt 70 * :sign
fd :size
lt 70 * :sign fern :size * 0.5 :sign rt 70 * :sign
rt 7 * :sign fern :size - 1 :sign lt 7 * :sign
bk :size * 2
end
window clearscreen pu bk 150 pd
fern 25 1