xxxxxxxxxx
94
function setup() {
createCanvas(400, 400);
}
function draw() {
background(102, 178, 255);
//hair
fill (0)
ellipse (200, 200, 210, 290)
fill(204, 204, 255)
ellipse (200, 380, 290, 200)
//neck
fill (255, 178, 102)
ellipse (200, 300, 60, 100)
// face
fill (255, 178, 102)
ellipse (200, 200, 150, 170)
fill(0)
ellipse (170, 120, 60, 50)
ellipse (230, 120, 60, 50)
// flower
fill (0, 153, 0)
arc (250, 110, 60, 20, 0, QUARTER_PI + PI)
arc (250, 110, 40, 15, 0, QUARTER_PI + PI)
fill (255, 0, 0)
circle(250, 110, 30)
circle(250, 110, 20)
circle(250, 110, 10)
circle(250, 110, 5)
circle(250, 110, 1)
// first eye
fill (0)
curve (160, 200, 160, 160, 180, 160, 190, 160)
fill(255)
ellipse (170, 170, 30, 15)
// pupil movement mapped
fill (0)
let x1 = map(mouseX, 0, 200, 165, 170);
let x2 = map(mouseY, 0, 200, 168, 170);
ellipse (x1, x2, 10, 10)
// second eye
fill (0)
curve (240,160,240,160,220, 160,220,200)
fill (255)
ellipse (230, 170, 30, 15)
fill (0)
let x3 = map(mouseX, 0, 200, 224, 230);
let x4 = map(mouseY, 0, 200, 168, 170);
ellipse (x3, x4, 10, 10)
// nose
fill (255, 204, 153)
triangle (190, 200, 200, 160, 210, 200 )
//lips
ellipse (200, 230, 30, 10)
line (120, 350, 120, 400)
line (280, 350, 280, 400)
}