2009年12月10日 星期四

作業7


油畫
size 400 400





paper 0





fast

command rect x y w h c

{

pen c h c

line (x+1) (y+h*2) (x+h*2) (y-h*2)

line (x-1) (y+h*2) (x+h*2) (y+h*2)

line (x-1) (y-h*2) (x-h*2) (y+h*2)

line (x+1) (y-h*2) (x-h*2) (y-h*2)

}



forever
{
rect 20 10 (
}

2009年12月3日 星期四

作業6-自畫像、血跡

自畫像

size 400 400

forever
{
set [ ]
set [(+1) ()]
set [(-1) ()]
set [() (+1)]
set [() (-1)]
set [(+1) (+1)]
set [(-1) (-1)]
set [(-1) (+1)]
set [(+1) (-1)]

}


血跡

size 400 400

forever
{
set [ ]
set [(+1) ()]
set [(-1) ()]
set [() (+1)]
set [() (-1)]
set [(+1) (+1)]
set [(-1) (-1)]
set [(-1) (+1)]
set [(+1) (-1)]

}



2009年11月13日 星期五

開扇




size 400 400
paper 0


repeat x 0 400
{
pen 10
line 400 0 x 400


pen ((
line 0 400 x 0
}

2009年11月5日 星期四

期中:數位康丁斯基




期中:數位康丁斯基


load dbngraphics.dbn
size 500 500
paper 30 80 120
//

FASTRepeat a 450 465
{
pen a 120 20
line 400 a 475 a
}
//

Repeat N 0 15{circle 375 275 (N/2) 100}

Repeat V 15 60{circle 375 275 (V/2) 0}

Repeat P 30 35{circle 375 275 P 100}
//

set M 60
Repeat B 325 425
{
pen A 20 50
triangle B M 375 (M+200) 425 M
}
//

Repeat A 225 275
{
pen 100
line A 100 250 145
}
//

Repeat A 220 280
{
pen 100
line A 145 250 180
}
//

Repeat A 210 290
{
pen 100
line A 180 250 225
}
//

Repeat A 300 450
{
pen 50 40 60
line A 400 375 275
}
//

Repeat A 25 150
{
pen 220 100 40line A 175 85 90
}
//

Repeat A 100 225
{
pen 180 60 250
line A 200 100 455
}
//

Repeat A 25 100
{
pen 40 110 100
line A 280 100 325
}
//

Repeat A 25 100
{
pen 100 50 100
line A 325 25 280
}
//

Repeat A 75 100
{
pen 100 120 20
line A 235 100 220
}
//

Repeat A 75 100
{
pen 120 50 200
line A 215 100 200
}
//

Repeat A 30 70
{
pen 200
line A 220 50 180
}
//
field 20 260 100 250 0
//

Repeat A 200 250
{
pen 180 40 40
line A 400 250 360
}
//

Repeat D 200 250
{
pen 180 40 40
line D 360 200 400
}
//

Repeat A 115 130{
circle 90 0 A 80}

2009年10月29日 星期四

作業4-菱形漸層



size 200 200
paper 100
command square x y s c
{
pen (1+(c*6)) (15+c) c
line x y (x+(s/2)) (y+s)
line (x+(s/2)) (y+s) (x+s) y
line (x+s) y x y
}
command square2 x y s c
{
pen (1+(c*6)) (15+c) 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 square3 x y s c
{
pen (1+(c*6)) (15+c) 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 15 23
{
repeat A 0 4
{
repeat B 0 3
{
square3 (30+(A+A)*15) (28+(B+B)*23) D ((A+B)*8)
}
}
}

2009年10月22日 星期四

英倫菱形格子

Load dbngraphics.dbn
size 300 300
paper 30
fast



set M 50


//白色區塊
Repeat A 0 50
{
pen 0
triangle 0 0 (M/2) A M 0
triangle (M*2) 0 (M*2+25) A (M*3) 0
triangle (M*4) 0 (M*4+25) A (M*5) 0
}

Repeat C 100 150
{
pen 0
triangle (M+25) C M (M*2) (M*2) (M*2)
triangle (M*3+25) C (M*3) (M*2) (M*4) (M*2)
triangle (M*5+25) C (M*5) (M*2) (M*6) (M*2)
}

Repeat C 100 50
{
pen 0
triangle (M+25) C M (M*2) (M*2) (M*2)
triangle (M*3+25) C (M*3) (M*2) (M*4) (M*2)
triangle (M*5+25) C (M*5) (M*2) (M*6) (M*2)
}

Repeat E 200 250
{
pen 0
triangle (M/2) E 0 (M*4) M (M*4)
triangle (M*2+25) E (M*2) (M*4) (M*3) (M*4)
triangle (M*4+25) E (M*4) (M*4) (M*5) (M*4)
}

Repeat E 200 150
{
pen 0
triangle (M/2) E 0 (M*4) M (M*4)
triangle (M*2+25) E (M*2) (M*4) (M*3) (M*4)
triangle (M*4+25) E (M*4) (M*4) (M*5) (M*4)
}

Repeat G 300 250
{
pen 0
triangle (M+25) G M (M*6) (M*2) (M*6)
triangle (M*3+25) G (M*3) (M*6) (M*4) (M*6)
triangle (M*5+25) G (M*5) (M*6) (M*6) (M*6)
}


//黑色區塊
//第一行
Repeat B 50 0
{
pen 100
triangle 0 B 0 B (M/2) M
triangle M B (M/2) M (M+25) M
triangle (M*2) B (M+25) M (M*2+25) M
triangle (M*3) B (M*2+25) M (M*3+25) M
triangle (M*4) B (M*3+25) M (M*4+25) M
triangle (M*5) B (M*4+25) M (M*5+25)M
triangle (M*6) B (M*5+25) M (M*6) M
}

//第二行
Repeat B 50 100
{
pen 100
triangle 0 B 0 B (M/2) M
triangle M B (M/2) M (M+25) M
triangle (M*2) B (M+25) M (M*2+25) M
triangle (M*3) B (M*2+25) M (M*3+25) M
triangle (M*4) B (M*3+25) M (M*4+25) M
triangle (M*5) B (M*4+25) M (M*5+25)M
triangle (M*6) B (M*5+25) M (M*6) M
}



//第三行
Repeat D 150 100
{
pen 100
triangle 0 D 0 (M*3) (M/2) (M*3)
triangle M D (M/2) (M*3) (M+25) (M*3)
triangle (M*2) D 75 (M*3) (M*2+25) (M*3)
triangle (M*3) D 125 (M*3) (M*3+25) (M*3)
triangle (M*4) D 175 (M*3) (M*4+25) (M*3)
triangle (M*5) D 225 (M*3) (M*5+25) (M*3)
triangle (M*6) D 275 (M*3) (M*6) (M*3)


}
//第四行
Repeat D 150 200
{
pen 100
triangle 0 D 0 (M*3) (M/2) (M*3)
triangle M D (M/2) (M*3) (M+25) (M*3)
triangle (M*2) D 75 (M*3) (M*2+25) (M*3)
triangle (M*3) D 125 (M*3) (M*3+25) (M*3)
triangle (M*4) D 175 (M*3) (M*4+25) (M*3)
triangle (M*5) D 225 (M*3) (M*5+25) (M*3)
triangle (M*6) D 275 (M*3) (M*6) (M*3)

}



//第五行
Repeat F 250 200
{
pen 100
triangle 0 F 0 (M*5) (M/2) (M*5)
triangle M F (M/2) (M*5) (M+25) (M*5)
triangle (M*2) F (M+25) (M*5) (M*2+25) (M*5)
triangle (M*3) F (M*2+25) (M*5) (M*3+25) (M*5)
triangle (M*4) F (M*3+25) (M*5) (M*4+25) (M*5)
triangle (M*5) F (M*4+25) (M*5) (M*5+25) (M*5)
triangle (M*6) F (M*5+25) (M*5) (M*5+25) (M*5)
}

//第六行
Repeat F 250 300
{
pen 100
triangle 0 F 0 (M*5) (M/2) (M*5)
triangle M F (M/2) (M*5) (M+25) (M*5)
triangle (M*2) F (M+25) (M*5) (M*2+25) (M*5)
triangle (M*3) F (M*2+25) (M*5) (M*3+25) (M*5)
triangle (M*4) F (M*3+25) (M*5) (M*4+25) (M*5)
triangle (M*5) F (M*4+25) (M*5) (M*5+25) (M*5)
triangle (M*6) F (M*5+25) (M*5) (M*5+25) (M*5)
}

//線
pen 100

line 0 50 25 0
line 0 150 75 0
line 0 250 125 0
line 0 350 175 0
line 0 450 225 0
line 0 550 275 0
line 0 650 325 0
line 0 750 375 0
line 0 850 425 0

line 25 300 -125 0
line 75 300 -75 0
line 125 300 -25 0
line 175 300 25 0
line 225 300 75 0
line 275 300 125 0
line 325 300 175 0
line 375 300 225 0
line 425 300 275 0

2009年10月15日 星期四

pattern - 紅黃藍世界




size 175 100

Repeat A 0 2
{
pen 100
Line A 0 A 100
pen 100
Line 0 A 175 A
pen 100
Line (172+A) 0 (172+A) 100
pen 100
Line 0 (97+A) 175 (97+A)
pen 100
Line 60 (80+A) 175 (80+A)
pen 100
Line 8 (10+A) 175 (10+A)
pen 100
Line 0 (40+A) 145 (40+A)
pen 100
Line (8+A) 0 (8+A) 100
pen 100
Line (60+A) 40 (60+A) 100
pen 100
Line (75+A) 0 (75+A) 80
pen 100
Line (145+A) 10 (145+A) 100
pen 100
Line (125+A) 10 (125+A) 40
}
Repeat B 8 56
{
pen 100 0 0
Line (B+3) 43 (B+3) 96
}
Repeat C 171 148
{
pen 0 0 100
Line C 13 C 79
}
Repeat D 79 43
{
pen 100 100 0
Line 78 D 144 D
}
Repeat E 13 39
{
pen 100
Line 11 E 75 E
}
Repeat F 9 3
{
pen 100 0 0
Line 78 F 171 F
}
Repeat G 148 171
{
pen 100
Line G 83 G 97
}
Repeat H 79 43
{
pen 0 0 100
Line 63 H 74 H
}

2009年10月1日 星期四

作業1


// enter program
size 400 300

paper 80

pen 0

line 0 275 50 275
line 50 275 25 250
line 25 250 50 225
line 50 225 25 225
line 25 225 25 0
line 50 275 125 275
line 50 250 125 250
line 50 250 50 200
line 50 200 125 200
line 125 250 125 200
line 50 225 125 225
line 85 300 85 150
line 85 200 50 150
line 85 200 150 125
line 127 150 225 225
line 225 225 250 195
line 175 125 200 145
line 185 115 205 130
line 195 122 195 0
line 200 125 220 95
line 220 95 400 225
line 215 155 245 178
line 220 180 265 127
line 265 127 250 125
line 225 145 245 135
line 300 152 300 0
line 315 100 400 100
line 375 150 315 50
line 335 80 335 10
line 335 80 385 80
line 385 80 385 10
line 385 10 335 10