xxxxxxxxxx
28
var xcor = 200;
var ycor = 200;
function setup() {
createCanvas(400, 400);
rectMode(CENTER);
}
function draw() {
background(220);
// body
strokeWeight(2);
fill(175);
rect(xcor, ycor, 20, 40);
// head
fill(255);
ellipse(xcor, ycor - 30, 30, 40);
// one eye
fill(0);
ellipse(xcor, ycor - 30, 10, 20);
// legs
line(xcor - 10, ycor + 20, xcor - 15, ycor + 30);
line(xcor + 10, ycor + 20, xcor + 15, ycor + 30);
}