2009年12月3日 星期四

作業六 自畫像_香菇頭

因為我的頭髮很像香菇頭
所以用Q板的樣子來呈現

先來一張沒有香菇的樣子


變香菇了




程式
// enter program
size 400 400
paper 0
fast

command rpect x y w h c
{
pen 100
line (x-w/x) (y-h/y) (x+w/x) (y-h/y)
line (x+w/x) (y-h/y) (x+w/x) (y+h/y)
line (x+w/x) (y+h/y) (x-w/x) (y+h/y)
line (x-w/x) (y+h/y) (x-w/x) (y-h/y)
}
forever
{
set [<mouse 1>< mouse 2>] <mouse 3>
}

2009年11月11日 星期三

作業五 TIME





程式碼
size 200 200
//設定背景

paper 100



//利用時間控制線條顏色


repeat x 0 200

{

pen

2009年11月6日 星期五

期中考 康丁斯基



全部跑完要兩分鐘,所以簡短一下

程式碼
// enter program
// enter program
load dbngraphics.dbn
paper 80 245 220
size 400 300
fast

//弧
repeat A 90 100
{
circle 70 250 (A/2) 100

}

pen 80 245 220

repeat A 0 125








{




line 120 210 A 300




}



//弧
repeat A 90 100
{
circle 90 280 (A/2) 130

}

pen 80 245 220

repeat A 0 150








{




line 135 210 A 300




}


pen 80 245 220

repeat A 30 50








{




line A 250 A 275




}

//黃色方形

pen 100 90 0





repeat A 290 280








{




line 320 A 380 A




}




//白色方形

pen 100 100 100






repeat A 150 156








{




line 25 A 100 A




}





//綠紅三角



pen 10 30 10


Repeat A 50 100


{


line A 156 50 180


}


pen 80 0 0


Repeat A 50 100


{


line 100 156 A 180


}


//紅色方形


pen 80 0 0
Repeat A 162 180
{
line A 230 180 246
}
pen 80 0 0
Repeat A 162 180
{
line 180 214 A 230
}

pen 80 0 0
Repeat A 180 198
{
line A 230 180 246
}
pen 80 0 0
Repeat A 180 198
{
line 180 214 A 230
}


//連綠紅的大三角

pen 60 0 0
repeat A 100 225
{
line 100 275 A 110
}

//小黃色三角形


pen 100 90 0






repeat A 75 100








{




line 100 125 A 145




}



//紅色小三角

pen 60 0 0





repeat A 80 100








{




line 100 110 A 120




}


//黑色三角

pen 0 0 0





repeat A 32 50








{




line 50 110 A 145




}
pen 0 0 0





repeat A 50 68








{




line 50 110 A 145




}

//橘色大三角

pen 100 60 0





repeat A 20 180








{




line 100 20 A 100




}


//黑色大三角

pen 0 0 0





repeat A 270 315








{




line 315 180 A 250




}
pen 0 0 0





repeat A 315 360








{




line 315 180 A 250




}

//下面的三角

pen 40 0 0





repeat A 300 315








{




line A 100 315 180




}
pen 40 0 0





repeat A 315 330








{




line A 100 315 180




}

//下半身
pen (A/30) 0 0
repeat A 300 330
{
line A 20 A 100
}

pen (A/30) 0 0
repeat A 290 330
{
line A 20 300 100
}

pen (A/30) 0 0
repeat A 330 340
{
line A 20 330 100
}

//三座三角形



pen 0 0 0



repeat A 230 280



{



line A 115 255 165



}




pen 0 0 0



repeat A 240 270



{



line A 65 255 115



}



pen 0 0 0



repeat A 245 265



{



line A 30 255 65



}





//圓圈圈內
repeat A 0 30
{
circle 315 180 (A/2) 100

}

//圈圈外


repeat A 80 100
{
circle 315 180 (A/2) 100

}

//弧
repeat A 120 130
{
circle 100 0 (A/2) 100
}

2009年10月28日 星期三

10/14 使用command square 結構綜合設計

黑白系!





// enter program

size 200 200
paper 0



command square x y s c
{
pen (c/20)
line x y (x+s) (y+s)
line (x+s) (y+s) (x+s) y
line (x+s) y x y
}
command square2 x y s c
{
pen c
line (x-s) y x y
line x y (x-(s/2)) (y-s)
line (x-(s/2)) (y-s) (x-s) y
}

command square x y s c
{
pen (c/2)
line x y x (y+s)
line x (y+s) (x+s) (y+s)
line (x+s) (y+s) (x+s) y
line (x+s) y x y
}

command square5 x y s c
{
pen (c/4)
line x y x (y+s)
line x (y+s) (x+s) (y+s)
line (x+s) (y+s) (x+s) y
line (x+s) y x y
}
repeat A 0 19
{
repeat B 0 19
{
square5 (A*10+2) (B*10+2) 5 (100-(A*B-50))
}
}

command square3 x y s c
{
pen c
line x y (x+(s/2)) (y+s)
line (x+(s/2)) (y+s) (x+s) y
line (x+s) y (x+(s/2)) (y-s)
line (x+(s/2)) (y-s) x y
}
repeat D 10 17
{
repeat A 0 5
{
repeat B 0 3
{
square3 (15+(A+A)*15) (12+(B+B)*23) D (10+(A+B)*11)
}
}
}
repeat D 10 17
{
repeat A 0 5
{
repeat B 0 3
{
square2 (31+(A+A)*15) (45+(B+B)*23) D (10+(A+B)*11)
}
}
}
repeat D 10 17
{
repeat A 0 4
{
repeat B 0 3
{
square3 (30+(A+A)*15) (28+(B+B)*23) D (10+(A+B)*11)
}
}
}


command square4 x y s c
{
pen (c/2)
line x y x (y+s)
line x (y+s) (x+s) (y+s)
line (x+s) (y+s) (x+s) y
line (x+s) y x y
}
repeat A 0 5
{
repeat B 0 5
{
square4 (10+(A+A)*15) (10+(B+B)*15) 25 (10+(A+B)*8)
}
}
repeat A 4 0
{

}

彩色系!


// enter program
size 200 200
paper 0



command square x y s c
{
pen (c/20) 60 0
line x y (x+s) (y+s)
line (x+s) (y+s) (x+s) y
line (x+s) y x y
}
command square2 x y s c
{
pen c 60 0
line (x-s) y x y
line x y (x-(s/2)) (y-s)
line (x-(s/2)) (y-s) (x-s) y
}

command square x y s c
{
pen 60 (c/2) 0
line x y x (y+s)
line x (y+s) (x+s) (y+s)
line (x+s) (y+s) (x+s) y
line (x+s) y x y
}

command square5 x y s c
{
pen (c/2) 60 70
line x y x (y+s)
line x (y+s) (x+s) (y+s)
line (x+s) (y+s) (x+s) y
line (x+s) y x y
}
repeat A 0 19
{
repeat B 0 19
{
square5 (A*10+2) (B*10+2) 5 (100-(A*B-50))
}
}

command square3 x y s c
{
pen 60 0 (c-20)
line x y (x+(s/2)) (y+s)
line (x+(s/2)) (y+s) (x+s) y
line (x+s) y (x+(s/2)) (y-s)
line (x+(s/2)) (y-s) x y
}
repeat D 10 17
{
repeat A 0 5
{
repeat B 0 3
{
square3 (15+(A+A)*15) (12+(B+B)*23) D (10+(A+B)*11)
}
}
}
repeat D 10 17
{
repeat A 0 5
{
repeat B 0 3
{
square2 (31+(A+A)*15) (45+(B+B)*23) D (10+(A+B)*11)
}
}
}
repeat D 10 17
{
repeat A 0 4
{
repeat B 0 3
{
square3 (30+(A+A)*15) (28+(B+B)*23) D (10+(A+B)*11)
}
}
}


command square4 x y s c
{
pen (c/2)
line x y x (y+s)
line x (y+s) (x+s) (y+s)
line (x+s) (y+s) (x+s) y
line (x+s) y x y
}
repeat A 0 5
{
repeat B 0 5
{
square4 (10+(A+A)*15) (10+(B+B)*15) 25 (10+(A+B)*8)
}
}
repeat A 4 0
{

}

2009年10月22日 星期四

10/08 三原型-設計應用 飛向宇宙浩瀚無敵~!!

飛向宇宙浩瀚無敵~!!




概念:
剛看完PIXAR沒多久
想到玩具總動員巴斯常說的那句名言
於是有此創作

程式碼
// enter program

size 200 200
load dbngraphics.dbn

fast
Repeat A 30 45
{
circle 60 60 (A/2+5) 80
}


Repeat A 25 50
{
pen 80 30 0
rectangle A 25 A 50
}


Repeat A 0 200
{
pen 100
Line 0 (A*6) (A*6) 200
pen 60 20 0
Line 0 (A*6) (A*6) 160
}

Repeat A 0 200
{
pen 60 20 0
Line 160 (A*6) (A*6) 0
}


Repeat A 0 100
{
pen 100
Line 200 (A*6) (A*6) 0
}

Repeat A 35 40
{
pen 90 70 0
rectangle A 2 A 40
}

Repeat A 40 35
{
pen 90 70 0
rectangle 40 A 2 A
}

Repeat A 75 125
{
pen 20 30 60
triangle A 100 100 A 125 125
}

Repeat A 85 115
{
pen 80 30 40
triangle A 90 90 A 115 115
}

2009年10月15日 星期四

10/1 pattern 設計應用 黑白方塊



黑白方塊的組合
// enter program

fast
Repeat B 0 80

{
Repeat A 0 80

{
Set [(A*6) (B*6)] 100
}
}

Repeat B 0 25
{
Repeat A 0 25
{
Set [(A*6) (B*6)] 100
}
}

Repeat B 0 25
{
Repeat A 0 50
{
Set [(A*4) (B*4)] 75
}
}

Repeat C 1 4
{
Repeat B 0 30
{
Repeat A 0 30
{
Set [(A*C) (B*C)] (C*50)
}
}
}

field 0 0 40 40 100

field 60 60 100 100 80
field 20 60 40 80 60
field 5 5 15 15 0

2009年9月24日 星期四

9/23 個人中文名字設計 –蘇鈺婷




程式碼
paper 90 40 0
size 300 300
pen 0
line 0 275 300 275
line 25 300 30 250
line 100 300 95 250
line 30 240 5 210
line 30 240 50 225
line 50 225 5 180
line 25 200 160 200
line 25 200 25 160
line 60 200 60 160
line 25 180 60 180
line 25 160 60 160
line 42 200 42 160
line 25 150 25 0
line 35 150 35 0
line 45 150 45 0
line 55 150 55 0
line 60 240 100 240
line 85 240 85 25
line 77 180 73 150
line 93 180 99 150
line 133 250 110 210
line 133 250 155 210
line 120 175 266 175
line 133 200 133 125
line 120 165 125 125
line 150 165 140 125
line 115 125 200 125
line 177 175 177 75
line 185 115 190 75
line 0 75 300 75
line 225 250 225 50
line 225 50 250 5
line 240 250 240 50
line 240 50 225 5
line 277 295 277 275
line 255 265 290 265
line 255 265 255 175
line 290 265 290 175
line 255 175 290 175
line 252 160 252 50
line 252 160 292 160
line 292 160 292 50
line 274 75 274 10
line 260 10 274 10





請應用
size
paper
pen
line
四個指令
設計自己的中文名字
必須具有構圖設計

ps. 最慢下次上課前po上來