xxxxxxxxxx
47
let x = 160, y = 390
let bodyHeight = 180
let neckHeight = 40
let radius = 45
let neckY = y - bodyHeight - neckHeight - radius
function setup() {
createCanvas(720, 480)
strokeWeight(2)
ellipseMode(RADIUS) // spcify radiud rather than width
background(204)
// Neck
stroke(102)
line(x+ 2, y-bodyHeight, x+ 2, neckY)
line(x+12, y-bodyHeight, x+12, neckY)
line(x+22, y-bodyHeight, x+22, neckY)
// Antennae
line(x+12, neckY, x-18, neckY-43)
line(x+12, neckY, x+42, neckY-99)
line(x+12, neckY, x+78, neckY+15)
// Body
noStroke()
fill(102)
circle(x, y-33, 33)
fill(0)
rect(x-45, y-bodyHeight, 90, bodyHeight-33)
fill(102)
rect(x-45, y-bodyHeight+17, 90, 6)
// Head
fill(0)
circle(x+12, neckY, radius)
fill(255)
circle(x+24, neckY-6, 14)
fill(0)
circle(x+24, neckY-6, 3)
fill(153)
circle(x, neckY-8, 5)
circle(x+30, neckY-26, 4)
circle(x+41, neckY+6, 3)
}
function draw() {
}