2008年5月5日 星期一

只有一朵的花
隨著滑鼠點擊,可以增加圖片數量。
float R;
float G;
float B;
float L;
void setup() {
size(800,800);
background(255);
smooth();
stroke(200, 50);
}
void draw(){
if (mousePressed == true){
translate(mouseX, mouseY); // Set initial offset
for (int i = 0; i <>
R=random(0,255);
G=random(0,255);
B=random(0,255);
L=random(10,200);
stroke(R,G,B,20);
strokeWeight(10); // Increase stroke weight
rotate(PI/143); // Accumulate the rotation
line(0, 0, L, 0);
}}}

沒有留言: