/*Ju Young Park Nature of Code 02.19.2013 ITP NYU */ float startAngle = 0.0; float aVel = 0.0; float y; void setup(){ size(800, 400); smooth(); } void draw(){ background(255); startAngle += 0.015; float angle = startAngle; for(int x =0; x<=width; x+= 8){ y = map(sin(angle), -1, 1, 0, height); //stroke(0); //noStroke(); stroke(23, 76, 116); //fill(38, 119, 149); fill(0, 64, 234); ellipse(x,y, 45, 45); angle += aVel; beginShape(); fill(2, 124, 214); //stroke(23, 76, 116); stroke(71, 154, 185); vertex(x, y); //vertex(x, height); //vertex(x, y); vertex(x, height); //vertex(x,y); //vertex(x, height-y); vertex(x+20, height); vertex(x+20, y); endShape(CLOSE); } } void mousePressed(){ aVel += 0.1; println(aVel); }