xxxxxxxxxx
122
function setup() {
createCanvas(400, 400);
rectMode(CENTER);
angleMode(DEGREES);
}
function draw() {
background(227, 202, 252);
//grid
for (var x = 0; x < width; x += width / 10) {
for (var y = 0; y < height; y += height / 10) {
stroke(217, 250, 226);
strokeWeight(2);
line(x, 0, x, height);
line(0, y, width, y);
}
}
//end grid
//hair swoops
noFill();
stroke(152, 163, 155);
strokeWeight(4);
curve(300,300, 150,90, 300,60, 220,5);
curve(350,350, 150,90, 300,60, 220,20);
curve(300,315, 160,90, 300,60, 220,25);
curve(350,320, 170,90, 300,60, 250,25);
curve(300,315, 180,90, 300,60, 220,25);
curve(300,315, 190,90, 300,60, 220,25);
curve(300,315, 200,90, 300,60, 220,25);
curve(350,320, 210,90, 300,60, 250,25);
curve(350,320, 220,90, 300,60, 250,25);
curve(350,320, 230,90, 300,60, 250,25);
curve(350,320, 240,90, 300,60, 250,25);
curve(350,320, 250,90, 300,60, 250,25);
//face
noStroke();
fill(222, 178, 98);
rect(200,230, 250,280, 50);
//ears
circle(75,190, 50);
circle(330,190, 50);
//hair main
fill(152, 163, 155);
triangle(200,140, 150,90, 250,90);
//jawstroke left
noFill();
stroke(82, 48, 4);
strokeWeight(5);
beginShape();
curveVertex(180, 590);
curveVertex(150,365);
curveVertex(78, 220);
curveVertex(100, 120);
endShape();
//jawstroke right
strokeWeight(5);
beginShape();
curveVertex(180, 590);
curveVertex(250,365);
curveVertex(320, 220);
curveVertex(210, 120);
//line(250,365, 297, 365);
//line(315, 350, 321,220);
//line(297,365, 315, 350);
endShape();
//circle(296,345, 40);
noFill();
//eyes
noStroke();
fill('white');
circle(150,200, 50);
circle(250,200, 50);
//eyebrows
stroke('black');
strokeWeight(15);
let y2 = map(mouseY, 130,110, 110,190, true);
line(120, 150, 170, y2); //left
line(275, 150, 230, y2); //right
//pupils
noStroke();
stroke
fill('black');
circle(150,200, 30);
circle(250,200, 30);
//nose
noFill();
strokeWeight(7);
stroke(82, 48, 4);
arc(200, 250, 50, 50, -70, 150);
arc(180, 260, 20, 20, -290, 180);
//name
noStroke();
fill('black');
text('its sukh', 30,200);
text('its sukh', 330,200);
//smile
noFill();
stroke('red');
arc(180, 300, 50, 50, -270, 150);
}