//green curve variables int x; float y; float [] yArray; boolean outGrid; //background curve variables float y1; float y2; float freq; float amp; boolean backgroundCurve; void setup(){ size(1000,400); //green curve variables x=1; yArray = new float [width+1]; yArray[0]=(height/2); outGrid=false; //background curve variables backgroundCurve=true; freq = 2; amp=-(height/8); } void draw(){ background(0); //sizes int widthSquare = 10; stroke(122); //draw x lines int yGrid=0; for (int i=0; i<((height)/widthSquare)+1; i++){ line (0,yGrid,width,yGrid); yGrid+=widthSquare; } //draw y lines int xGrid=0; for (int i=0; i<(width/widthSquare); i++){ line (xGrid,0,xGrid,height); xGrid+=widthSquare; } //draw background wave if (backgroundCurve==true){ stroke(112); for (int i=1; i