size(500, 300);
smooth();
background(255);
strokeWeight(5);
colorMode(HSB, 100);

int y = height/2;
int step = 10; //x値(始点終点)を10ずつ更新

for (int i = step; i <= width - 20; i += step){
int startx = i;
int endx = i + step;
stroke(random(100), 50, 100);
line(startx, y, endx, y);
}
http://sketchpad.cc/IJc4UzBFr2