xxxxxxxxxx
58
function setup() {
createCanvas(400, 400);
strokeWeight(4);
// stroke('#e76f51');
}
function draw() {
background('#e9c46a');
// Leg
line( width / 2, height / 2, width / 2, height * 5 / 6);
// Right Arm
line( width / 2, height / 2 - 80, width * 5 / 6, height / 2);
// Left Arm
line( width / 2, height / 2 - 80, width * 1 / 6, height / 2);
// Hairs
line( width / 2, height / 2, width / 2, 100);
line( width / 2 - 20, height / 2, width / 2 - 20, 80);
line( width / 2 + 20, height / 2, width / 2 + 20, 90);
// Big Body Rect
const rectSize = 100;
const bodyX = width / 2 - rectSize / 2;
const bodyY = height / 2 - rectSize / 2 - 30;
fill('#264653');
rect(bodyX, bodyY, rectSize, rectSize);
// Small Body Rect
const miniRectSize = 40;
const miniBodyX = width / 2 - miniRectSize / 2;
const miniBodyY = height / 2 - miniRectSize / 2 - 30;
fill('#2a9d8f');
rect(miniBodyX, miniBodyY, miniRectSize, miniRectSize);
// Right Hand
const rightHandSize = 40;
const rightHandX = width * 5 / 6;
const rightHandY = height / 2;
ellipse(rightHandX, rightHandY, rightHandSize, rightHandSize);
// Left Hand
const leftHandSize = 40;
const leftHandX = width * 1 / 6;
const leftHandY = height / 2;
ellipse(leftHandX, leftHandY, leftHandSize, leftHandSize);
// Foot Circle
const footCircleSize = 60;
const footCircleX = width / 2;
const footCircleY = height * 5 / 6 - 20;
fill('#e76f51');
ellipse(footCircleX, footCircleY, footCircleSize, footCircleSize);
}