2008年4月7日 星期一

課堂練習

void setup( ) {
size(800,600);
background(200,255,255);
noLoop( );
}
void draw( ) {
for(int i=0;i<400;i++) {
float x,y,z,lx,ly,lz,a,b,c;
x = random(0,800);
y = random(0,600);
z =random(0,800);
lx= random(0,600);
ly = random(0,800);
lz = random(0,600);
a =random(0,255);
b =random(0,255);
c =random(0,255);
fill(a,b,c,150);
triangle(x,y,z,lx,ly,lz);
}
}

沒有留言: