//// 080214a cr by rha on thales2 with P 0135 beta //// follow R&F handbook p. 179 // 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); drawX(); // do the shape ex = ex + 1; // incr erase each frame } void drawX(){ stroke(255); // white on black is classic if (ex < dx){ line(x0 + ex, y0, x0 + dx, y0); // first step line(x0 + dx, y0, x0 + dx, y0 + dy); // fixed riser line(x0 + dx, y0 + dy, x0 + dx + ex, y0 + dy); // second step } } //// end