size (600,400); int y = 80; ////vertical location of each line int x = 50; //// Initial horizontal location for first line int spacing = 10; //// /How far apart is each line int len = 20; ////length of each line int endlegs = 150; stroke(0); while (x <= endlegs) { rect(x,y,x,y+len); ///draw each leg x = x + spacing; ////Add spacing to X }