void setup() { size(200,200); background(255); person(50, 150, 30); person(100, 180, 20); person(150, 150, 30); } /* Draw a person centered above (x,y) having width w. The rest of the size is proportional to the width. */ void person(int x, int y, int w) { line(x-w/2, y, x, y-w); // left leg line(x+w/2, y, x, y-w); // right leg line(x, y-w, x, y-2*w); // trunk line(x, y-1.5*w, x-w/2, y-2*w); // left arm line(x, y-1.5*w, x+w/2, y-2*w); // right arm ellipse(x, y-2.5*w, w, w); // head }