int w, h; // width and height of ball float x, y; // initial position float spdX, spdY; // speed in X and Y directions float gravity, damping; // coeffecients for acceleration and damping void setup(){ size(800, 600); background(255); noFill(); x = 100; y = 100; spdX = 8.1; spdY = 0.0; gravity = .125; for (int i=0; i<100; i++) { x +=spdX; spdY += gravity; y += spdY; ellipse(x, y, x*.1, y*.1); } } void draw(){ }