/* 6.914, Example 1.6 working with the mouse I: mouseX/mouseY (and pmouseX, pmouseY) Every time that draw() executes, it evaluates the position of the mouse as two coordinates, mouseX and mouseY. These two coordinates can be used to control shapes, colors, etc - they are floating-point decimals and can be used like any other floats. pmouseX and pmouseY are the previous values of mouseX and mouseY in the last frame. */ void setup(){ size(300, 400); background(255, 0, 100); frameRate(3); } void draw(){ line(pmouseX, pmouseY, mouseX, mouseY); println("the coordinates of the mouse are: "+mouseX+", "+mouseY); }