xxxxxxxxxx
152
function setup() {
createCanvas(400, 400);
}
function draw() {
background(87, 6, 140);
strokeWeight(3);
//X and Y coordinates of the face as variables
let faceX = width/2;
let faceY = height/2-20;
let faceWidth = 170;
let faceHeight = 190;
let skin = color(255, 233, 220)
let NYU = color(137, 0, 225)
angleMode(RADIANS);
//back hair
push()
fill(color('rgb(61,17,17)'))
ellipse(faceX, faceY+25, 200, 300);
pop()
//body
push()
fill(NYU)
arc(faceX-40, faceY+130, 100, 20, PI, TWO_PI-HALF_PI)
arc(faceX+40, faceY+130, 100,20, TWO_PI-HALF_PI, TWO_PI)
noStroke()
rectMode(CENTER)
rect(faceX, faceY+180, 180, 100)
pop()
//neck
push()
fill(skin)
rectMode(CENTER)
rect(faceX, faceY+90, 80, 70)
arc(faceX, faceY+120, 80, 60, 0, PI)
//left arm
push()
fill(NYU)
arc(faceX-85, faceY+230, 90, 205, PI, TWO_PI-HALF_PI-0.04)
stroke(color('black'))
line(faceX-85, faceY+190, faceX-90, faceY+260)
//right arm
arc(faceX+85, faceY+230, 90, 205, TWO_PI-HALF_PI+0.04, TWO_PI)
stroke(color('black'))
strokeWeight(2)
line(faceX+85, faceY+190, faceX+90, faceY+260)
pop()
//ear
push()
fill(skin)
ellipse(faceX-83, faceY-10, 20, 40)
ellipse(faceX+83, faceY-10, 20, 40)
ellipse(faceX-83, faceY-10, 10, 15)
ellipse(faceX+83, faceY-10, 10, 15)
pop()
//face
push()
fill(skin)
ellipse(faceX, faceY, 170, 190)
pop()
//left eye
push()
fill(color('white'))
ellipse(faceX-40, faceY-20, 40, 30)
fill(color('black'))
ellipse(faceX-40, faceY-20, 25, 25)
pop()
//right eye
push()
fill(color('white'))
ellipse(faceX+40, faceY-20, 40, 30)
fill(color('black'))
ellipse(faceX+40, faceY-20, 25, 25)
pop()
//eyebrow
push()
angleMode(DEGREES)
stroke(color('black'))
noFill()
arc(faceX-40, faceY-20, faceWidth/3, faceHeight/4, 210, 325)
arc(faceX+40, faceY-20, faceWidth/3, faceHeight/4, 220, 330)
pop()
angleMode(RADIANS)
//nose
line(faceX, faceY-5, faceX-10, faceY+20)
arc(faceX, faceY+20, 20, 20, 1, PI)
//mouth
fill(color('rgb(255,215,222)'))
arc(faceX, faceY+45, 65, 50, 0, PI, CHORD)
//front hair
push()
noStroke()
angleMode(DEGREES)
fill(color('rgb(61,17,17)'))
arc(faceX+50, faceY-100, 100, 80, 60, 170)
arc(faceX-40, faceY-95, 140, 75, -5, 130)
pop()
//HYEIN
textAlign(CENTER)
textSize(40)
textStyle(BOLD)
fill(color('white'))
text('HYEIN', faceX, faceY+207)
//New York University
push()
strokeWeight(3)
noStroke()
textAlign(CENTER)
textSize(30)
textStyle(BOLD)
angleMode(DEGREES)
translate(55, 200)
rotate(270)
fill('white')
text('NEW YORK UNIVERSITY', 0, 0)
pop()
//CLASS OF 2027
push()
strokeWeight(5)
stroke(color('white'))
textAlign(CENTER)
textSize(50)
textStyle(BOLD)
textStyle(ITALIC)
angleMode(DEGREES)
translate(340, 200)
rotate(90)
fill('white')
text('CLASS OF 2027', 0, 0)
pop()
}