int len = 20;
float[] x = new float[len];
float[] y = new float[len];
//
void setup(){
colorMode(HSB,360,100,100);
size(500,500);
background(255);
// gifExport = new GifMaker(this,"aa.gif");
// gifExport.setRepeat(0);
}
void draw(){
background(#FFFFFF);
noStroke();
if(mousePressed){
addPosition();
for(int i=x.length-1;i>=0;i--){
if(x[i]!=0){
fill(198,100-100/len*i,98);
ellipse(x[i],y[i],50-50/len*i,50-50/len*i);
}
}
}else{
x = new float[len];
y = new float[len];
}
// gifExport.setDelay(1000/30);
// gifExport.addFrame();
}
//import gifAnimation.*; //GifMaker gifExport; int len = 20; float[] x = new float[len]; float[] y = new float[len]; // void setup(){ colorMode(HSB,360,100,100); size(500,500); background(255); // gifExport = new GifMaker(this,"aa.gif"); // gifExport.setRepeat(0); }
原文地址:http://ieday.cn/thread-115103-1-1.html
内容来源:设计e周(意周)-http://ieday.cn/