2009年11月13日 星期五

work 4 稿紙
























// 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 10 50
{
repeat B 20 30
{
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)
}
}
}



repeat A 10 0
{

}

work III 黑色饗宴










size 300 300
paper 0


Repeat A 0 300
{
pen 100
Line (20+A*4) 0 (20+A*4) 300
pen 50
Line (15+A*4) 0 (15+A*4) 300
pen 20
Line (10+A*4) 0 (10+A*4) 300
pen 10
Line (5+A*4) 0 (5+A*4) 300

pen 100
Line (20+A/8) 300 (20+A/8) 0
pen 50
Line (15+A/4) 300 (15+A/4) 0
pen 20
Line (10+A/2) 300 (10+A/2) 0
pen 10
Line (5+A/1) 300 (5+A/1) 0
}



Repeat A 0 300

{

pen 90

Line 0 (A*6) (A*6) 300

pen 90

Line 0 (A*6) (A*6) 0

}


Repeat A 0 300
{
pen A
line A A 300 A
}


2009年11月5日 星期四

Test go rock go












Load dbngraphics.dbn
size 300 300 2
paper 50 65 65
fast

Repeat B 0 20
{
circle 65 145 (15-B) 75
}

Repeat c 0 5
{
circle 65 145 (45-c) 75
}

Repeat A 260 270
{
pen 85 55 15
rectangle 20 A 75 A
}

Repeat A 125 133
{
pen 100 100 100
rectangle 225 A 290 A
}

Repeat c 0 70
{
pen 40 25 25
triangle 65 145 (20+c) 220 (120-c) 220
}

Repeat c 0 50
{
pen 35 40 40
triangle 65 145 (45+c) 20 (100-c) 20
}

Repeat c 0 20
{
pen 100
triangle 140 145 (120+c) 110 (160-c) 110
triangle 140 110 (125+c) 75 (155-c) 75
triangle 140 75 (130+c) 40 (150-c) 40

}

Repeat c 0 60
{
pen 80 30 10
triangle 245 25 (200+c) 90 (290-c) 90
}

Repeat d 0 20
{
pen 100
triangle 270 85 (260+d) 110 (275-d) 110
}

Repeat d 0 50
{
pen 75 20 20
triangle 225 275 (165+d) 100 (225-d) 100
}

Repeat d 0 5
{
pen 75 90 20
triangle 250 120 225 (120-d) 225 (113+d)
}

Repeat d 0 5
{
pen 40 15 25
triangle 250 120 225 (120-d) 225 (113+d)
}






2009年10月14日 星期三

作業二




















paper 50 100 30
size 300 300
repeat A 70 80
{
pen 50 80 100
line 0 (100+A) 300 (100+A)
line 0 (50+A) 300 (50+A)
}

repeat C 20 80
{
pen 10 80 100
line 0 (280+C) 400 (280+C)
line 0 (260+C) 400 (260+C)
line 0 (240+C) 400 (240+C)
line 0 (220+C) 400 (220+C)
line 0 (200+C) 400 (200+C)
line 0 (180+C) 400 (180+C)
line 0 (160+C) 400 (160+C)
line 0 (140+C) 400 (140+C)
line 0 (120+C) 400 (120+C)
line 0 (100+C) 400 (100+C)
line 0 (80+C) 400 (80+C)
line 0 (60+C) 400 (60+C)
line 0 (40+C) 400 (40+C)
line 0 (20+C) 400 (20+C)
line 0 (0+C) 400 (0+C)
line (280+C) 0 (280+C) 300
line (260+C) 0 (260+C) 300
line (240+C) 0 (240+C) 300
line (220+C) 0 (220+C) 300
line (200+C) 0 (200+C) 300
line (180+C) 0 (180+C) 300
line (160+C) 0 (160+C) 300
line (140+C) 0 (140+C) 300
line (120+C) 0 (120+C) 300
line (100+C) 0 (100+C) 300
line (80+C) 0 (80+C) 300
line (60+C) 0 (60+C) 300
line (40+C) 0 (40+C) 300
line (20+C) 0 (20+C) 300
line (0+C) 0 (0+C) 300
}
repeat b 60 10
{
PEN 10 55 50

line 0 (50+B) 100 (50+B)
line 0 (20+B) 100 (20+B)
line 0 (110+B) 100 (110+B)
line 0 (140+B) 100 (140+B)
line 0 (250+B) 100 (250+B)
line 0 (240+B) 100 (240+B)
line (280-B) 0 (280-B) 100
line (260-B) 0 (260-B) 100
line (240-B) 0 (240-B) 100
line (220-B) 0 (220-B) 100
line (120-B) 0 (120-B) 100
line (100-B) 0 (100-B) 50

}

2009年9月28日 星期一

作業一


// enter program

paper 0

size 150 100 6

pen 90 30 20

line 1 0 20 0
line 20 1 20 20
line 1 20 20 20
line 1 20 1 0
line 15 10 5 10
line 10 21 10 0

line 25 75 50 75
line 30 85 30 65
line 45 85 45 65
line 35 60 40 60
line 30 55 45 55
line 38 55 30 50
line 30 50 42 50
line 40 52 45 48

line 70 20 80 20
line 70 40 80 40
line 70 30 80 30
line 75 20 75 40
line 85 22 87 27
line 87 27 87 40
line 87 40 105 40
line 105 40 105 25
line 105 25 108 21
line 108 21 110 21
line 91 35 100 35
line 91 30 100 30
line 91 30 91 25
line 100 30 100 25
line 95 35 95 20

2009年9月23日 星期三