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

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?


1 Like

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.

The idea is that you use ellipse() - see reference - for head and eyes and then rect() for the mouth.
See reference on the website:

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


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.

PImage snow;

void setup () {

  size (800, 800);
  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)

1 Like

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

1 Like