Week 3: Processing : Gesture, Mouse

SImple Drawing Programs

mouseX : a built-in variable that always has the current X coordinate of the mouse
mouseY : the Y coordinate of the mouse

void setup () { size(640,480); background(255); stroke(0); fill(0); } void draw() { point(mouseX,mouseY); }
void setup () { size(640,480); background(255); stroke(0); fill(0); } void draw() { ellipse(mouseX,mouseY,6,6); }
void setup () { size(640,480); background(255); stroke(0); fill(0); } void draw() { line(mouseX,mouseY,0,0); }
void setup () { size(640,480); background(255); stroke(0); fill(0); } void draw() { line(mouseX,mouseY,320,240); }