pc logo是一个绘图软件,如果学得好还可以lt 10 repeat 2[fd 70 rt 90 repeat 360[fd 5*pi/180 lt 1]home rt 10] lt 10
repeat 6[repeat 360[fd :x*pi/180 lt 1]make"x :x+5]make"x :x-30
repeat 6[repeat 360[fd :x*pi/180 rt 1]make"x :x+5]
end
to fdf
pu fd 30 lt 90 fd 70 rt 90 pd repeat 16[fd 20 rt 90 fd 20 lt 90 fd 20 rt 90 fd 20 lt 45]pu home pd repeat 8[repeat 4[fd 20 rt 90]rt 45]repeat 8[pu fd 28 pd fd 20 rt 90 fd 20 lt 90 fd 20 lt 90 fd 40 lt 90 fd 20 lt 90 fd 20 rt 90 pu fd 48 rt 180+45]
end
to ee
make "x (300-random 600)
make "y (600-random 1200)
pu setxy se :y :x seth (random 360)
pd e (random 15)
setpc (random 15)
ee
end
to e:d
repeat 5[fd :d rt 144]
end
to z
w
make "a (random 5)
if :a=1[make"x :x1]
if :a=2[make"x :x2]
if :a=3[make"x :x3]
if :a=4[make"x :x4]
if :a=5[make"x :x5]
make "a (random 5)
if :a=1[make"y :y1]
if :a=2[make"y :y2]
if :a=3[make"y :y3]
if :a=4[make"y :y4]
if :a=5[make"y :y5]
make "a (random 5)
if :a=1[make"m :m1]
if :a=2[make"m :m2]
if :a=3[make"m :m3]
if :a=4[make"m :m4]
if :a=5[make"m :m5]
make "a (random 5)
if :a=1[make"n :n1]
if :a=2[make"n :n2]
if :a=3[make"n :n3]
if :a=4[make"n :n4]
if :a=5[make"n :n5]
make "a (random 5)
if :a=1[make"2x :m1]
if :a=2[make"2x :m2]
if :a=3[make"2x :m3]
if :a=4[make"2x :m4]
if :a=5[make"2x :m5]
if :m=:2x then make "b (word "在:x "的时候:y"上,:m在:n".) pr :b stop
make "b (word "在:x "的时候:y"上,:m"和:2x"在:n".)
pr :b
end
以上就是程序与图案
前进 fd
后退 bk
重复 repeat
右转 rt
左转 lt
清屏 cs
提笔 pu
落笔 pd
显龟 st
藏龟 ht
改变笔的大小 setw
命令 简写 功能