# Creating a self-moving face (eyes and mouth only)

**URL:** <https://discourse.processing.org/t/creating-a-self-moving-face-eyes-and-mouth-only/15293>\
**Category:** Coding Questions\
**Created:** [November 7, 2019, 8:52am UTC](https://discourse.processing.org/t/creating-a-self-moving-face-eyes-and-mouth-only/15293 "2019-11-07T08:52:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JigKSaw](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@JigKSaw](https://discourse.processing.org/u/JigKSaw)\
**Post date:** [November 7, 2019, 8:52am UTC](https://discourse.processing.org/t/creating-a-self-moving-face-eyes-and-mouth-only/15293/1 "2019-11-07T08:52:15Z")

</div>

Hi there. It’s my intention to create a storyteller at the center of the window, who will speak, kinda like this:

👀  
👄

which opens autonomously eyes and mouth (in a mechanic way).  
How can I draw/create them?

Thanks!

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [November 7, 2019, 9:11am UTC](https://discourse.processing.org/t/creating-a-self-moving-face-eyes-and-mouth-only/15293/2 "2019-11-07T09:11:08Z")

</div>

Hey and welcome to the forum!

Nice to have you here!

Did you look at the video tutorials and the first three text tutorials?

In the example section of the Website you‘ll find a section with motion.  
See [https://www.processing.org/examples/](https://www.processing.org/examples/)

The idea is that you use ellipse() - see reference - for head and eyes and then rect() for the mouth.  
See reference on the website: [https://www.processing.org/reference/](https://www.processing.org/reference/)

If you have the lower lip you can move it by having a variable y that changes `ellipse(100,y,30,6); y++;`.

Please show your code and then we proceed accordingly together

Regards, Chrisir

---

<div class="post-metadata">

**Author:** ![JigKSaw](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@JigKSaw](https://discourse.processing.org/u/JigKSaw)\
**Post date:** [November 8, 2019, 3:28pm UTC](https://discourse.processing.org/t/creating-a-self-moving-face-eyes-and-mouth-only/15293/3 "2019-11-08T15:28:16Z")

</div>

I ended up choosing to use animated gifs od eyes and mouth. Still, I tried to put a gif as the background but won’t work.

```auto
PImage snow;

void setup () {

  size (800, 800);
  smooth();
  
  snow = loadImage("img/giphy-15.gif");
}

void draw () {

  background (snow, 800, 800); 

```

> ERROR: The method background(int, float) in the type PApplet is not applicable for the arguments (PImage, int, int)

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [November 8, 2019, 3:52pm UTC](https://discourse.processing.org/t/creating-a-self-moving-face-eyes-and-mouth-only/15293/4 "2019-11-08T15:52:20Z")

</div>

background is just

background (image);

without the x,y bit because it fills the entire screen

You use resize in setup to change your image
