size(600,400);
background(255);
noFill();
for(int x=150;x<=450;x=x+10)
{
bezier(300,100,x,100,x,300,300,300);
}


size(600,400);
background(255);
noFill();
for(int x=150;x<=450;x=x+5)
{
strokeWeight(3);
stroke(255,0,255,90);
bezier(300,100,x,100,x,300,300,300);
}

size(600,400);
background(255);
noFill();
for(int x=200;x<=400;x=x+5)
{
strokeWeight(3);
stroke(255,0,255,90);
bezier(300,100,x,170,x,300,300,300);
}

void setup(){
size(800,800);
background(0);
}
void draw(){
//background(0);
//随机颜色
stroke(random(255),random(0),random(255));
strokeWeight(random(10));
line(mouseX,mouseY,mouseX,0);
//此处是重点
}
网友评论