2010年1月17日 星期日

作業九:應用判斷 same? notsame? 結構式 配合其他的指令創作






程式碼:

size 400 500
paper 100
fast

command rects x y w h r g b
{
pen r g b
repeat w1 0 5
{
pen r g b
line (x+(w1/200)) (y-h/2) (x+(w1/2)) (y+h/2)
line (x+(w1/200)) (y-h/2) (x+(w1/2)) (y+h/2)
}
}

forever
{
same? 0
{
rects 20 80 (80-

沒有留言:

張貼留言