////080220c, build upon 080220a, a slinky // add offset args // get some variables (dimensions of our angle) int x0 = 50; // have to declare the type in P int y0 = 100; // have to declare the type in P int dx = 50; // width of step int dy = 50; // height of riser int ex = 0; // length to erase // setup the canvas void setup(){ size(400, 300); // do not want to change this later background(0); // black is nice for a movie/} frameRate(5); // slow } // draw some lines void draw(){ background(0); draw1(0, 0); // do the shape ex = ex + 1; // incr erase each frame } void draw1(int cx, int cy){ stroke(255, 255, 0); // yellos on black is nicer noFill(); smooth(); strokeWeight(10.0); strokeJoin(MITER); int u = x0 + cx; // offset x int v = y0 + cy; // offset x if (ex < dx){ beginShape(); vertex(u + ex, v); // x0 + dx, y0); // first step vertex(u + dx, v); // x0 + dx, y0 + dy); // fixed riser vertex(u + dx, v + dy); // ); // second step vertex(u + dx + ex, v + dy); // end point endShape(); } } //// end