xxxxxxxxxx
43
function setup() {
createCanvas(600, 600);
}
function draw() {
background(220);
drawCreature(width/2, height/2);
}
function drawCreature(x, y) {
push();
translate(x, y);
// YOUR CODE GOES HERE
// body (face)
push();
translate(0, 0);
ellipse(0, 0, 150, 200);
ellipse(-20, -30, 5, 5);
ellipse(20, -30, 5, 5);
ellipse(0, 10, 40, 40);
pop();
// left arm
push();
translate(-60, 20);
rotate(PI * 1.25);
ellipse(40, 0, 100, 20);
ellipse(0, 0, 5, 5); // it's always useful you display the origin position (0,0) with a point or circle.
pop();
// right arm
push();
translate(60, 20);
rotate(PI * 1.75);
ellipse(40, 0, 100, 20);
ellipse(0, 0, 5, 5);
pop();
pop();
}