// Dartmouth CS 2, Winter 2009, Chris Bailey-Kellogg // Notes 8 | Sketch 6 void setup() { stroke(255); strokeWeight(10); } void draw() { background(0); float dx = mouseX - width/2; float dy = mouseY - height/2; float angle = atan2(dy, dx); pushMatrix(); translate(width/2,height/2); rotate(angle); line(0,0,25,0); popMatrix(); }