float x1 = 0; float y1 = 0; int r = 200; float theta1 = 0.0; int angle; int xspacing1 = 16; float dx1; float period1 = 500.0; void setup(){ size(1136,640); background(0); stroke(255); dx1 = (TWO_PI/ period1) * xspacing1; } void draw(){ background(0); theta1 += 0.02; line(0,320,1160,320); float x1 = theta1; for(angle=0;angle<720;angle++){ x1 = (angle)/180* PI; y1 = -1*r*sin(x1+theta1); point(x1*100,y1+320); x1+=dx1; } }