/* lines_to_x.pde Written by Larry Synder Draws lines from the left side of the screen to the horizontal position of the mouse. */ void setup() { size(400,400); strokeWeight(4); stroke(0); } void draw() { background(204); // draw over canvas // draw vertical lines from x = 10 to x = mouseX // with 8 pixels in-between int i = 10; while (i < mouseX) { line(i, 10, i, 390); i = i + 8; } }