Code Sketch


Chicken Face
By: Ramanand K R
Category: Art
// Settings
drawStage(purple)
val cb = canvasBounds
val x=cb.x
val y=cb.y
val width=cb.width
val height=cb.height
val face_radius=100
val eye_radius=10
val beak_length=20


// Chicken Hair
val hair=Picture
{
  right()
  left(90,100)
  right(180,10)
  right(90,90)
  
}
hair.setPenColor(black)
hair.setPenThickness(2)
hair.setFillColor(yellow)
hair.setPosition(x+width/2-40,y+height/2+50)
hair.rotate(45)
draw(hair)

// Chicken Face
val face=Picture.circle(face_radius)
face.setPenColor(black)
face.setPenThickness(2)
face.setFillColor(yellow)
face.setPosition(x+width/2,y+height/2)
draw(face)

// Chicken Eyes
val eye1=Picture.circle(eye_radius)
eye1.setPenColor(white)
eye1.setPenThickness(10)
eye1.setFillColor(black)
eye1.setPosition(x+width/2-50,y+height/2)
draw(eye1)

val eye2=Picture.circle(eye_radius)
eye2.setPenColor(white)
eye2.setPenThickness(10)
eye2.setFillColor(black)
eye2.setPosition(x+width/2+50,y+height/2)
draw(eye2)

// Chicken Beak
val beak=Picture.rectangle(beak_length,beak_length)
beak.setPenColor(black)
beak.setPenThickness(4)
beak.setFillColor(orange)
beak.setPosition(x+width/2-15,y+height/2-50)
beak.rotate(-45)
draw(beak)

invisible()