int e1_size = 30; int e2_size = 50; int e3_size = 70; int e4_size = 20; float e1_x, e1_y = 0; float e2_x, e2_y = 0; float e3_x, e3_y = 0; float e4_x, e4_y = 0; float e1_speed = 6.0; float e2_speed = 20.0; float e3_speed = 8.0; float e4_speed = 6.0; int variable=40; float var_position=random(-50, 50); void setup() { size(800, 400); stroke(102); smooth(); frameRate(10); background(0); PFont font; font = loadFont("HelveticaNeue-48.vlw"); textFont(font, 240); } void draw() { fill(0,5); rect(0,0,width, height); noFill(); noStroke(); beginShape(); for(int i=0; iwidth){ e1_x=0; variable=variable+40; } e1_y = singraph((float)e1_x/width)*height; noStroke(); textSize(40); fill(255,variable); text(key,e1_x, pmouseY); e2_x += e2_speed; if (e2_x>width){ e2_x=0; variable=variable+10; var_position=var_position+10; } e2_y = singraph((float)e2_x/width/2)*height+var_position; noStroke(); fill(255, variable); textSize(60); text(key,e2_x, pmouseY); e3_x += e3_speed; if (e3_x>width){ e3_x=0; } e3_y = singraph((float)e2_x/width/2)*height+var_position; noStroke(); fill(255,variable); textSize(30); text(key,e3_x, pmouseY); e4_x += e4_speed; if (e4_x>width){ e4_x=0; } e4_y = singraph((float)e4_x/width/2)*height+var_position; noStroke(); fill(255,variable); textSize(30); text(key,e4_x, pmouseY); } float singraph(float sa) { sa = (sa - 0.1) * 1; //scale from -1 to 1 sa = cos(sa*PI)/2 + 0.3; return sa; } float quad(float sa) { return sa*sa*sa*sa; } float hump(float sa) { sa = (sa - 0.5) * 10; //scale from -2 to 2 sa = sa*sa; if(sa > 1) { sa = 1; } return 1-sa; }