2009年11月11日 星期三

作業五 TIME







size 200 200


paper 10


repeat x 0 200
{
pen

2009年11月5日 星期四

11/5期中考




}


Load dbngraphics.dbn

size 350 300

paper 255 228 181

fast



set M 50




Repeat C 100 275//直角
{
pen 10 45 55

triangle (M*3+75) C (M*3) (M*2) (M*3) (M*2)

}

repeat A 285 275//左上長方形
{
line 15 A 75 A
}


pen 10 20 35//右中長方形

repeat A 150 190
{
line 225 A 290 A
}

repeat A 140 130 //右下長方形
{
line 225 A 325 A
}


pen 100 50 0//右下大倒三角
Repeat A 175 300
{
line A 75 240 25
}
pen 80 80 0
Repeat A 255 300//右邊倒小三角
{
line A 120 280 85
}

pen 0 0 0//中間三個三角形
Repeat A 100 135
{
line A 25 115 75
}

Repeat A 85 145
{
line A 75 115 125
}

Repeat A 75 150
{
line A 125 115 180
}


pen 60 0 0//左邊三角
Repeat A 25 75
{
line A 20 50 175
}


Repeat A 15 85//左邊倒三角
{
line A 250 50 175
}

pen 50 0 0//中間矩形

Repeat A 225 250
{
line 150 A 175 A
}


pen 255 194 14//三角
Repeat A 255 225
{
line A 125 225 115
}


pen 0 0 0//三角
Repeat A 245 225
{
line A 115 225 100
}

Repeat A 0 90//圓
{
circle 50 175 (A/2) 80
}


Repeat A 0 40
{
circle 50 175 (A/2) 80
}

2009年10月28日 星期三

作業四 command square 結構綜合設計






size 150 150
paper 100 100 20
command square x y s c
{
pen c
line x y s (s+s)


}
repeat A 1 20
{
repeat B 0 20
{
square (A*10+3) (B*10+5) 2 (A+B*10)
}
}

作業三 :三原型










load dbngraphics.dbn
paper 100 20 20
size 300 300
fast

circle 150 150 190 15
circle 150 150 170 15
circle 150 150 150 15
circle 150 150 130 15
circle 150 150 110 15
circle 150 150 90 15
circle 150 150 70 15
circle 150 150 50 15
circle 150 150 30 15
circle 150 150 10 15


circle 0 150 149 0
circle 0 150 145 0
circle 0 150 140 0
circle 0 150 135 0
circle 0 150 130 0



circle 300 150 149 0
circle 300 150 145 0
circle 300 150 140 0
circle 300 150 135 0
circle 300 150 130 0

2009年10月20日 星期二

作業二 延伸










程式碼
size 300 300
paper 0
fast

Repeat A 0 100
{
pen 255 20 147
line 0 (A*3) 5 (A*3)

pen 25
line 27 (A*3) 50 (A*3)

pen 2 2 200
line 27 (A*3) 32 (A*3)

pen 35
line 0 (A*3) 300 (A*3)
pen 2 2 200
line 50 (A*3) 250 (A*3)

pen 45
line 0 (A*6) 300 (A*6)
pen 2 2 2
line 0 (A*6) 300 (A*6)
}

Repeat A 0 300
{
pen 0 50 0
Line 300 (A*6) (A*6) 0

pen 60 5 5
Line 150 (A*6) (A*6) 0

pen 60 5 5
Line 0 (A*6) (A*6) 300

pen 0 50 0
Line 0 (A*6) (A*6) 150
}