运行结果
代码部分
void setup(){
size(800,800);
}
void draw(){
background(0);
noFill();
stroke(255,255);
for(int i = 0;i<11;i++){
float pingPong=sin(radians((frameCount+10*i)/0.7));
strokeWeight(map(abs(pingPong),0,1,25,0));
ellipse(width/2,height/2,i*70,i*70);
}
}
因为学习的深度还尚浅,其中一些代码参考老师提供的代码