2008年5月6日 星期二

Flower



Code:
void setup()
{
size(800,600);
background(255);
}
void draw(){}
void mousePressed()
{
smooth();
stroke(random(0,255),random(0,255),random(0,255), 120);
translate(mouseX, mouseY); // Set initial offset
for (int i = 0; i < 12; i++) { // 18 repetitions
strokeWeight(50); // Increase stroke weight
rotate(PI/6); // Accumulate the rotation
line(0,0,55,0);
}
ellipse(0,0,30,30);
}

沒有留言: