Multiple Lines With While Loop
size (200, 200);
background(255);
 
// Multiple Lines
stroke(0);
 
int y = 80;        // Vertical location of each line
int x = 50;        // Initial horizontal location of the first line
int spacing = 10;  // How far apart is each line
int len = 20;      // Length of each lin
 
int endLegs = 150;
 
while (x <= endLegs) {
  line (x,y,x,y+len);
  x = x + spacing;
}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License