// Based on Example 04-08 from "Getting Started with Processing" // by Reas & Fry. int x = 20; int limit = 800; int boardWalkWidth = 760; void setup() { background(0); size(960, 240); smooth(); strokeWeight(2); stroke(255, 255, 255); frameRate(10); } void draw() { background(0); x = x - 1; limit = limit - 1; for (int i = x; i < limit; i += 20) { line(i, 10, i + i, 160); } line(x, 10, boardWalkWidth + x , 10); line(2 * x, 160, 2 * boardWalkWidth + 2 * x, 160); }