xxxxxxxxxx
66
function setup() {
createCanvas(600, 800);
background(200);
// Sky background
fill(135, 206, 250);
rect(0, 0, 1000, 5000 / 2);
// Shirt collar
fill(255);
triangle(240, 400, 300, 400, 270, 360);
triangle(360, 400, 300, 400, 330, 360);
// Suit (body)
fill(0);
rect(200, 400, 200, 300); // Suit body
rect(200, 600, 200, 300); // Suit body
rect(240, 700, 70, 200); //Chest Left
rect(320, 700, 70, 200); //Chest Right
rect(320, 410, 125, 200); // Right arm
rect(160, 410, 40, 200); // Left arm
rect(240, 400, 100, 200);
fill(255,220,180)
rect(400, 565, 50, 50); //Right hand
rect(150, 565, 50, 50); // Left hand
//Undershirt
fill(255)
rect(276,360,50,150)
// Tie
fill(255, 0, 0);
beginShape();
vertex(295, 400);
vertex(305, 400);
vertex(310, 460);
vertex(290, 460);
endShape(CLOSE);
triangle(290, 460, 310, 460, 300, 500); // Bottom of tie
// Face
fill(255, 220, 180);
ellipse(300, 300, 150, 200); // Head
// Hat
fill(0);
rect(230, 200, 150, 15); // Brim of hat
rect(259, 140, 80, 65); // Top of hat
// Apple
fill(50, 205, 50);
ellipse(300, 300, 100, 100); // apple body
fill(34,139,34);
rect(295, 240, 10, 20); // stem
fill(34, 139, 34);
triangle(295, 240, 305, 240, 300, 220); // Leaf on apple
}
function draw() {
}