/* * Simple "graphing calculator" to sketch the function: * y = 0.01 * (x-300)^2 * * Note well that the Processing coordinate system is * inverted relative to the traditional math orientation. */ size(600, 400); background(255); noFill(); beginShape(); for (int x=0; x <= width; x++) { float y = 0.01 * (x-300)*(x-300); vertex(x,y); } endShape();