2009年11月12日 星期四

作業五 : Time-1234 , forever, refresh 的應用





繽紛交叉沙漏

size 300 100
paper 0
forever
{

Set S (S*2)

repeat a 100 0
{
pen (2*(a)) (a) (3*a)
line 300 (a*3) (s-30) 0



pen ((a)) (2*a) (3*a)

line 0 (s-30) (a*8) 100
}
}

2009年11月5日 星期四

期中考試 : 數位康丁斯基






Load dbngraphics.dbn
size 500 400
paper 46 139 87
fast
set M 50

//-------三角形------

//01
Repeat E 150 200
{
pen 100
triangle (M*4) E (M*4+25) (M*3) (M*3+25) (M*3)
}

//02
Repeat E 100 150
{
pen 100

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

//03
Repeat B 50 100
{
pen 100
triangle (M*4) B (M*3+25) M (M*4+25) M
}

//04
Repeat G 150 375
{
pen 139 35 35
triangle (M*7+25) G 250 (M*3) (M*7) (M*4)
}
//05
Repeat C 50 125
{
pen 139 69 19
triangle (M*8) C 300 (M*2+25) (M*9+25) (M*2+25)
}

//------------圓--------------
circle 400 0 100 100
circle 400 0 99 100
circle 400 0 98 100
circle 400 0 97 100
circle 400 0 96 100
circle 400 0 95 100
circle 400 0 94 100

//-------三角形------

//06
Repeat E 175 200
{
pen 255 255 0
triangle (M*7+25) E (M*8+25) (M*4) (M*7+25) (M*4)
}
//07
Repeat E 150 175
{
pen 255 10 48
triangle (M*7+25) E (M*8) (M*3+25) (M*7+25) (M*3)
}

//08
Repeat C 125 175
{
pen 100
triangle (M*9) C (M*8+25) (M*3+25) (M*9+25) (M*3+25)
}

//09
Repeat E 225 275
{
pen 47 79 79
triangle (M*7+25) E (M*9) (M*4+25) (M*7+25) (M*5)
}

//10
Repeat E 225 275
{
pen 139 20 10
triangle (M*9) E (M*9) (M*4+25) (M*7+25) (M*5+25)
}

//11
Repeat E 300 350
{
pen 139 37 0
triangle (M*6) E (M*5+25) (M*6+25) (M*6+25) (M*6+25)
}

//12
Repeat Y 50 200
{
pen 100
triangle (M*2) Y (M+25) M (M*2+25) M
}

//----------長框---------------------
Repeat A 375 450
{
pen 0
line A 208 A 216
}
//--------------------------------------
Repeat A 25 100
{
pen 255 255 0
line A 364 A 375
}

//-----------圓----------------
repeat A 0 50
{
pen 80 80 80
Circle 100 200 A A
}

circle 100 200 0 100
circle 100 200 1 100
circle 100 200 2 100
circle 100 200 3 100
circle 100 200 4 100
circle 100 200 5 100
circle 100 200 7 100
circle 100 200 9 100
circle 100 200 10 100
circle 100 200 11 100
circle 100 200 13 100
circle 100 200 15 100
circle 100 200 17 100

//----三角形13------------
Repeat F 200 300
{
pen 100
triangle (M*2) F (M*3) (M*6) (M*1) (M*6)
}

//-----------圓----------------
circle 100 200 59 100
circle 100 200 58 100
circle 100 200 57 100
circle 100 200 56 100
circle 100 200 55 100
circle 100 200 54 100
circle 100 200 53 100