Make the Bear Interactive

Tyrene N Calvesbert
2 min readOct 30, 2017

--

its funny how you imagine the animation at first….. Look in to the eyes and you will get a message.

Look closely!
"""
def setup():
# this is the background
size(550, 550)
def draw():
# here I setup colors
faceColor = color(107, 58, 48)
noseColor = color(255, 182, 193)
centernoseColor = color(139, 69, 19)
# this is the face
background(faceColor)
# teeth
fill(255, 255, 255)
arc(200, 389, 80, 80, 0, PI, OPEN)
arc(369, 400, 80, 80, 0, PI, OPEN)
# big part of nose
strokeWeight(1)
fill(noseColor)
ellipse(300, 270, 450, 300)
# the nose
centernose = rect
strokeWeight(1)
fill(centernoseColor)
centernose(175, 200, 210, 150, 500)
# Sclera white part of eyes
fill(255, 255, 255)
arc(59, 46, 76, 26, 58, 98)
arc(435, 46, 76, 26, 58, 98)
# this is where the eyes are located
eyeRadius = 30
eyeYPosition = 45
leftEyeXPosition = 60
rightEyeXPosition = 436
# this is where I draw
fill(000)
ellipse(leftEyeXPosition, eyeYPosition, eyeRadius, eyeRadius)
fill(0, 0, 0)
ellipse(rightEyeXPosition, eyeYPosition, eyeRadius, eyeRadius)
# Make it interactive with mouse movementif (mouseX < 200):
eyeRadius = 40
ellipse(leftEyeXPosition, eyeYPosition, eyeRadius, eyeRadius)
else:
eyeRadius = 30
ellipse(rightEyeXPosition, eyeYPosition, eyeRadius, eyeRadius)
if (mouseY < 200):
eyeRadius = 40
ellipse(rightEyeXPosition, eyeYPosition, eyeRadius, eyeRadius)
else:
eyeRadius = 30
ellipse(leftEyeXPosition, eyeYPosition, eyeRadius, eyeRadius)
if (mouseX > 80):
centernose= rect
centernose(175, 200, 210, 150, 500)
textSize(55);
fill(0, 102, 153, 204);
text("I SEE YOU!!", 135, 500, -30)

--

--