2009年11月11日 星期三

作業五 : 蝴蝶紙雕燈罩



2009年11月5日 星期四

期中考試 : 數位康丁斯基







load dbngraphics.dbn
paper 88 138 98
size 400 300
fast

//直角三角形
set M 50
Repeat C 100 250
{
pen 70 15 25
triangle (M*5+25) C (M*4) (M*2) (M*5) (M*2)
}

//左綠直角
set A 125
//green
Repeat N 135 160
{
pen 20 40 30
triangle 280 135 (A+151) N (A+220) 135
}


//右下大倒三角
Repeat A 235 375
{
pen 100 65 0
line A 95 305 25
}
pen 100
triangle 160 110 180 154 200 110


set M 36
Repeat B 36 75
{
pen 100
triangle (M*5) B (M*4+20) M (M*5+15)M
}

pen 80 70 26
//右下長方形
line 276 127 370 127
line 276 128 370 128
line 276 129 370 129
line 276 130 370 130
line 276 131 370 131
line 276 132 370 132
line 276 133 370 133

set M 50
//第三行
Repeat C 75 110
{
pen 100
triangle (M*3+29) C (M+110) (M+25) (M*4) (M+25)
}


pen 80 70 20
//左上長方形
line 30 260 90 260
line 30 261 90 261
line 30 262 90 262
line 30 263 90 263
line 30 264 90 264
line 30 265 90 265
line 30 266 90 266
line 30 267 90 267


//重複畫直線組成一個三角形,同時重複畫筆的顏色。
Repeat A 250 200
{
pen 30 50 10
line A 200 200 A
}

Repeat A 250 200
{
pen 100 20 0
line 250 A A 250
}

//圓心

Repeat A 0 48
{
circle 100 150 (A/2+2) 90
}


//左上倒三角
Repeat C 40 165
{
pen 30 0 0

triangle C (M*4+25) (M*2) (M*3) (M*2) (M*4)
}

//外圓
Repeat A 50 60
{
circle 100 150 (A/2+35) 100
}

//右下小倒三角
Repeat A 330 360
{
pen 35 25 0
line A 125 346 95
}


set M 18
Repeat B 18 150
{
pen 49 3 3
triangle (M*5+10) B (M*6+30) M (M*3+15) M
}

2009年10月28日 星期三

command square 結構綜合設計

主題:蕨類

參考圖片↓


完成↓

程式碼↓ load dbngraphics.dbnsize 200 200paper 100 command square3 x y s c{ pen c 80 12 line y s x (x+c) line x (y+c) (y+s) (x+s) line x (x+c) (x+s) (c+s) line (y+s) (c+s) (y+s) c line (y+c) s c y}repeat A 0 10{ repeat B 0 5 { square3 (2+(A+B)*15) (10+(A+A)*15) 55 ((A+B)*4) }} command square4 x y s c{ pen c 54 27 line y s x (x+c) line x (y+c) (y+s) (x+s) line x (c+c) (x+s) (c+s) line (x+s) (c+s) (y+s) c line (y+c) x c y}repeat A 0 10{ repeat B 0 5 { square4 (2+(A+B)*15) (10+(A+A)*15) 55 ((A+B)*4) }}


2009年10月22日 星期四

作業三: CPU



Load dbngraphics.dbn
size 300 300
paper 0 40 60
pen 0


rectangle 20 20 280 280
rectangle 25 25 275 275
rectangle 30 30 270 270
rectangle 35 35 265 265
rectangle 40 40 260 260
rectangle 45 45 255 255
rectangle 50 50 250 250
rectangle 55 55 245 245
rectangle 60 60 240 240
rectangle 65 65 235 235
rectangle 70 70 230 230
rectangle 75 75 225 225

field 75 75 225 225 100

//第一列-小方形

rectangle 80 110 110 80
rectangle 80 115 110 145
rectangle 80 150 110 180
rectangle 80 185 110 215

//第二列-小方形
rectangle 115 110 145 80
rectangle 115 115 145 145
rectangle 115 150 145 180
rectangle 115 185 145 215

//第三列-小方形
rectangle 155 110 185 80
rectangle 155 115 185 145
rectangle 155 150 185 180
rectangle 155 185 185 215

//第四列-小方形
rectangle 190 110 220 80
rectangle 190 115 220 145
rectangle 190 150 220 180
rectangle 190 185 220 215

2009年10月21日 星期三

pattern - 日出




load dbngraphics.dbn
size 350 350
paper 0 0 20

repeat A 0 350
{
pen 30 24 A
line 0 A 350 A
}

Repeat A 350 0
{
pen 255 255 0 Line (5+A/10) 0 (0+A*60) 350
}
Repeat A 350 0
{
pen 255 69 0 Line (0+A/10) 0 (0+A*20) 325
}
Repeat A 350 0
{
pen 100 0 0 Line (1+A/5) 0 (0+A*10) 280
}


2009年9月30日 星期三

個人中文名字設計 –楊子瑩






size 500 500
paper 100 50 80

pen 0
line 75 450 75 25
line 25 400 470 400
line 75 175 130 255
line 75 175 25 255
line 75 150 275 150
line 225 175 275 250
line 225 175 175 250
line 275 150 275 25
line 225 250 225 150
line 470 400 385 290
line 385 290 385 25
line 385 25 330 100
line 100 125 250 125
line 100 85 250 85
line 100 45 250 45
line 175 45 175 125
line 235 45 215 65
line 200 430 275 430
line 200 455 275 455
line 200 455 200 400
line 275 400 275 455
line 300 200 470 200
line 275 400 175 300
line 375 400 285 295