2009年3月18日 星期三
003-flash homework 03
strX1 = 400;
strY1 = 100;
strX2 = 200;
strY2 = 300;
strX3 = 400;
strY3 = 500;
strX4 = 600;
strY4 = 300;
lineTotal = 300;
for (i=0; i< lineTotal; i++) {
a = random(2)*2-1;
this.lineStyle(0,random(0x44AA00),random(100));
this.moveTo(strX1,strY1);
ptX1 = random(500)*a+strX2;
ptY1 = random(300)*a+strY1;
ptX2 = random(500)*a+strX2;
ptY2 = random(300)*a+strY3;
ptX3 = random(500)*a+strX4;
ptY3 = random(300)*a+strY3;
ptX4 = random(500)*a+strX4;
ptY4 = random(300)*a+strY1;
this.curveTo(ptX1,ptY1,strX2,strY2);
this.curveTo(ptX2,ptY2,strX3,strY3);
this.curveTo(ptX3,ptY3,strX4,strY4);
this.curveTo(ptX4,ptY4,strX1,strY1);
}
訂閱:
張貼留言 (Atom)
good use of 4points.
回覆刪除clever.
keep going
thx~~
回覆刪除