2008年5月6日 星期二



void setup()
{
size(400, 400);
background(30,150,0);
smooth();
}
void draw(){
translate(mouseX,mouseY); // Set initial offset
if (mousePressed == true){
for (int i = 0; i < 30; i++)
{ // 18 repetitions
strokeWeight(7); // Increase stroke weight
rotate(PI/12); // Accumulate the rotation
stroke(random(0,255),random(0,100),random(0,100),random(150,180));
line(0, 0, 30, 0);
}
}
}

沒有留言: