DBN - 95452135

2009年12月10日 星期四

作業七: 捕鼠器-->使用本產品讓老鼠無所遁形





size 400 400
//設定背景
paper 100
fast
//設計一個以中心點為座標的實心方形
command rects x y w h r g b
{
pen r g b
repeat w1 0 50
{
pen r g b
line (x+(w1/2)) (y-h/2) (x+(w1/2)) (y+h/2)


line (x-w/2) (y-h/2) (x+w/2) (y-h/2)
line (x+w/2) (y-h/2) (x+w/2) (y+h/2)
line (x+w/2) (y+h/2) (x-w/2) (y+h/2)
line (x-w/2) (y+h/2) (x-w/2) (y-h/2)

line (x-w/4) (y-h/4) (x+w/4) (y-h/4)
line (x+w/4) (y-h/4) (x+w/4) (y+h/4)
line (x+w/4) (y+h/4) (x-w/4) (y+h/4)
line (x-w/4) (y+h/4) (x-w/4) (y-h/4)

}
}
forever
{
rects 50 30

2 個意見:

張貼留言

訂閱 張貼留言 [Atom]

<< 首頁