void drawTriangleManAtPoint(int x, int y) { stroke(128); // spine line(x, y, x, y + 40); // arms line(x, y + 12, x + 20, y + 22); line(x, y + 12, x - 20, y + 22); // legs line(x, y + 40, x + 10, y + 60); line(x, y + 40, x - 10, y + 60); noStroke(); fill(255); // head triangle(x - 8, y - 10, x + 8, y - 10, x, y + 8); // body ellipse(x, y + 30, 20, 40); // hands ellipse(x + 20, y + 22, 5, 5); ellipse(x - 20, y + 22, 5, 5); // feet triangle(x + 10, y + 60, x + 18, y + 60, x + 15, y + 55); triangle(x - 10, y + 60, x - 18, y + 60, x - 15, y + 55); } void setup() { size(400, 400); background(0); smooth(); } void draw() { background(0); drawTriangleManAtPoint(mouseX, mouseY); }