int vine_total_origin = 30; int vine_total = vine_total_origin; vine [] vine_origin = new vine [10000000]; void setup(){ size(800,500); background(0); framerate(30); vine_origin_generate(); } void vine_origin_generate(){ for(int i=0;i2 && !mousePressed){ vine_origin[i].grow(); } } } void mousePressed(){ vine_total = vine_total_origin; background(0); } void mouseReleased(){ vine_origin_generate(); } class vine{ float x,y,oldX,oldY,dist,dist_offset,ceta_origin,ceta; float depth,a; int dir; float random_red, random_green, random_blue; float r = 4; vine(){ } void grow(){ x += dist * cos(ceta + ceta_origin); y += dist * sin(ceta + ceta_origin); ceta = depth * sin(a); a += PI/180*10*dir; dist -= dist_offset; ///* if(dist<2) dist = 2; if(x<0) x = width; if(x>width) x = 0; //if(y<0) y = height; //if(y>height) y = 0; //*/ //fill(255); stroke(random_red,random_green,random_blue,120); strokeWeight(1); //ellipse(x,y,r,r); if(abs(oldX-x)