2008年5月6日 星期二

奇怪花




void setup()
{
size(800,600);
background(0);
}
void draw()
{
}
void mousePressed()
{
smooth();
stroke(1, 10);
translate(mouseX, mouseY); // Set initial offset
float x=random(0,200);
fill(255,x,x);
for (int i = 0; i < 18; i++) { // 18 repetitions
strokeWeight(i); // Increase stroke weight
rotate(PI/5); // Accumulate the rotation
fill(random(100,255),random(100,190),random(100,190));
ellipse(0,0,60,10);
}
}


===============================================================

奇怪的花

沒有留言: