顯示具有 花2 標籤的文章。 顯示所有文章
顯示具有 花2 標籤的文章。 顯示所有文章

2008年5月6日 星期二

花2


void setup() {
size(500, 500);
background(255);
smooth();
}
void draw(){
smooth();
translate(mouseX,mouseY); // Set initial offset
if (mousePressed == true) {
for (int i = 0; i < 25; i++)
{
strokeWeight(5); // Increase stroke weight
rotate(50);// Accumulate the rotation
stroke(random(0,255),random(0,255),random(0,255));
line(6, 1, 50, 50);
}
}
}