stroke(random(150,255),random(150,255),random(150,255),random(100,200));
strokeWeight(i);
weightrotate(PI/5);
rotationline(0, 0, 55, 0);
fill(255,0,0); ellipse(0,0,12,12);}
很多小花
void setup(){
size(800,600);
background(0,0,0);
smooth();
}
}
void draw(){
for(int j=0;j<400;j++)
{
translate(random(255),random(255));
for (int i = 0; i<30;>{
stroke(random(150,255),random(150,200),random(150,200),random(50,150));
strokeWeight(i);
rotate(PI/5);
line(0, 0, 55, 0);
fill(128,128,0);
ellipse(0,0,12,12);
}}}
用滑鼠點小花
void setup()
{size(800,600);
background(0,0,0);
smooth();
}
}
void draw()
{
if (mousePressed == true)
if (mousePressed == true)
{
translate(mouseX,mouseY);
for (int i = 0; i<30;>{
stroke(random(150,255),random(150,200),random(150,200),random(50,150));
strokeWeight(i);
rotate(PI/5);
line(0, 0, 55, 0);
fill(random(150,255),random(150,200),random(150,200));
ellipse(0,0,12,12);
}}}
沒有留言:
張貼留言