xxxxxxxxxx
87
function setup() {
createCanvas(800, 800);
background(255);
translate(width / 2 - 200, height / 2 - 220); // Center the portrait
// Skin color
let skinColor = color(224, 185, 149);
// Hair bun
fill(0); // Black color for hair
noStroke();
ellipse(200, 140, 80, 80); // Hair bun (centered above the head)
-
// Add more hair to the top of the head
fill(0); // Black color for hair
arc(200, 180, 160, 150, PI + QUARTER_PI, TWO_PI - QUARTER_PI); // Hair arc at the top of the head
// Add additional hair strands
ellipse(170, 160, 60, 100); // Left hair strand
ellipse(230, 160, 60, 100); // Right hair strand
// Face
fill(skinColor);
ellipse(200, 220, 130, 180); // Face shape
// Ears
fill(skinColor);
ellipse(140, 220, 30, 40); // Left ear
ellipse(260, 220, 30, 40); // Right ear
// Eyebrows
noFill();
stroke(0);
strokeWeight(8);
line(145, 180, 175, 180); // Left eyebrow
line(225, 180, 255, 180); // Right eyebrow
// Eyes
fill(255);
noStroke();
ellipse(160, 205, 25, 15); // Left eye white
ellipse(240, 205, 25, 15); // Right eye white
fill(0);
ellipse(160, 205, 18, 15); // Left eye pupil
ellipse(240, 205, 18, 15); // Right eye pupil
// Black eyeliner on the bottom of the eyes
stroke(0);
strokeWeight(2);
line(148, 213, 172, 213); // Left eye bottom eyeliner
line(228, 213, 252, 213); // Right eye bottom eyeliner
// Nose
noFill();
stroke(0);
strokeWeight(2);
beginShape();
vertex(200, 215);
vertex(195, 240); // Left nose
vertex(205, 240); // Right nose
endShape();
// Nose ring (silver hoop on the right side)
stroke(192, 192, 192); // Silver color
strokeWeight(2);
arc(205, 240, 15, 15, 0, PI); // Nose ring hoop (right side)
// Lips with a slight smile
noStroke();
fill(150, 50, 50); // Full lips color
beginShape();
vertex(180, 265); // Left corner of upper lip
bezierVertex(190, 260, 210, 260, 220, 265); // Upper lip curve (slightly lifted for a smile)
vertex(220, 265);
bezierVertex(210, 275, 190, 275, 180, 265); // Lower lip curve (flatter for subtle smile)
endShape(CLOSE);
// Neck
fill(skinColor); // Same skin color
rect(180, 280, 40, 50); // Neck rectangle below the face
// Black shirt
fill(0); // Black color for shirt
rect(140, 330, 120, 150); // Simple shirt shape (rectangular)
}