//draw an arrow void setup(){ size(400,400); smooth(); frameRate(30); println("This is an arrow"); //initialize mousex and mousey position in the center mouseX = 200; mouseY = 150; } void draw(){ fill(0); stroke(0); strokeWeight(4); strokeJoin(MITER); background(255); // draw arrow according to moue position quad (mouseX-1,mouseY+68,mouseX+22,mouseY+58,mouseX+73,mouseY+167,mouseX+50,mouseY+177); // desenha quadrilatero triangle (mouseX-52,mouseY-90,mouseX-52,mouseY+90,mouseX+73,mouseY+35); // DESENHA TRIANGULO println(mouseX); println(mouseY); }