Frog


def setup():
size(500, 500)
background(255, 204, 0)

def draw():
#this is where the face is
faceWidth = 180
faceHeight = 150
faceXPosition = 250
faceYPosition = 250

#this is where the eyes are
eyeRadius = 50
eyeYPosition = 180
leftEyeXPosition = 200
rightEyeXPosition = 300

#this is where the cheeks are
cheekWeight = 30
cheekHeight = 20
cheekYPosition = 240
leftcheekXPosition = 190
rightcheekXPosition = 310

#this is where the eyebolls are
eyebollRadius = 12
eyebollYPosition = 170
lefteyebollXPosition = 200
righteyebollXPosition = 300

#this is where the mouth is
mouthWidth = 80
mouthHeight = 20
mouthX = 250
mouthY = 280

#this is where the body is
bodyWidth = 100
bodyHeight = 140
bodyXPosition = 200
bodyYPosition = 300

#this is where the feet are
footWidth = 45
footHeight = 55
leftfootXPosition = 200
rightfootXPosition = 300
footYPosition = 420

#this is where the hands are
handWidth = 40
handHeight = 35
lefthandXPosition = 200
righthandXPosition = 300
handYPosition = 350

#this is where the nostrils are
nostrilRadius = 5
nostrilYPosition = 210
leftnostrilXPosition = 245
rightnostrilXPosition = 255


#this is where we define our color variables
mouthColorHighlight = color(153, 0, 0)
mouthColorUnHighlighted = color(255, 153, 204)

#this is where I draw the shapes of the face
noStroke()
fill(0, 204, 0)
rect(bodyXPosition, bodyYPosition, bodyWidth, bodyHeight)
stroke(0, 200, 0)
strokeWeight(6)
fill(255, 255, 255)
ellipse(leftEyeXPosition, eyeYPosition, eyeRadius, eyeRadius)
ellipse(rightEyeXPosition, eyeYPosition, eyeRadius, eyeRadius)
stroke(0, 200, 0)
strokeWeight(4)
fill(0, 300, 0)
ellipse(lefthandXPosition, handYPosition, handWidth, handHeight)
ellipse(righthandXPosition, handYPosition, handWidth, handHeight)
fill(0, 300, 0)
ellipse(leftfootXPosition, footYPosition, footWidth, footHeight)
ellipse(rightfootXPosition, footYPosition, footWidth, footHeight)
stroke(0, 200, 0)
strokeWeight(6)
fill(0, 225, 0)
ellipse(faceXPosition, faceYPosition, faceWidth, faceHeight)
noStroke()
fill(255, 153, 204)
ellipse(rightcheekXPosition, cheekYPosition, cheekWeight, cheekHeight)
ellipse(leftcheekXPosition, cheekYPosition, cheekWeight, cheekHeight)
fill(0,0,0)
ellipse(leftnostrilXPosition, nostrilYPosition, nostrilRadius, nostrilRadius)
ellipse(rightnostrilXPosition, nostrilYPosition, nostrilRadius, nostrilRadius)
stroke(0, 0, 0)
strokeWeight(3)
fill(0,0,0)
ellipse(lefteyebollXPosition, eyebollYPosition, eyebollRadius, eyebollRadius)
ellipse(righteyebollXPosition, eyebollYPosition, eyebollRadius, eyebollRadius)

#this is where the lines are
fill(0,0,0)
line(303,237,308,242)
line(313,237,318,242)
line(198,237,193,242)
line(188,237,183,242)


if mouseX < 250:
fill(mouthColorHighlight)
ellipse(mouthX, mouthY, mouthWidth, mouthHeight)
else:
fill(mouthColorUnHighlighted)
ellipse(mouthX, mouthY, mouthWidth, mouthHeight)

if mousePressed:
ellipse(mouthX, mouthY+7, mouthWidth*3/2, mouthHeight*3/2)
Like what you read? Give Qigao Wang a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.