class Point { int x; int y; Point(int x, int y) { this.x = x; this.y = y; } Point(Point p) { x = p.x; y = p.y; } } void affichePoint(Point p) { println(p.x+","+p.y); } void setup() { //Point p1 = new Point(32,50); //affichePoint(p1); size(1000,400); background(255); frameRate(24); } Point positionPrecedente; Point positionCourante; void draw() { positionCourante = new Point(mouseX, mouseY); affichePoint(positionCourante); if (positionPrecedente!=null) { line(positionPrecedente.x, positionPrecedente.y, positionCourante.x, positionCourante.y); } }