2008年5月5日 星期一

這是花?


void setup(){
background(0);
size(600,600);
smooth();
stroke(255, 120);
} void draw(){
if (mousePressed == true){
translate(mouseX, mouseY); // Set initial offset
for (int i = 0; i < 50; i++) { // 18 repetitions
strokeWeight(i/2); // Increase stroke weight
rotate(PI/12); // Accumulate the rotation line(0, 0, 100, 0);
stroke(random(0,255),random(0,255),random(0,255),random(0,200));
fill(random(0,255),random(0,255),random(0,255),random(0,200));
ellipse(0,0,50,50);
}
}
}

沒有留言: