command rects x y w h c { pen (/2) (*2) repeat w (5*(-w)) (5*(w)) { pen (/3) (*2) line (x+h) (y-w) (x+c) (y+h/5) line (x+(w/4)) (y-(4*h)) (x+(w/4)) (y+(4*h)) } }
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)