// This Processing code draws random dots on the vertical line // that runs through the mouse pointer. // setup() is only executed once, upon program startup void setup() { size(200,200); // create a 200x200 canvas background(102); // make it middle grey stroke(255); // draw white strokes } // draw() is repeated continuously after setup() ends void draw() { float y = random(0,height); // set y to a random value between 0 and 200. point(mouseX, y); // draw a point at height y and the mouse x }