Hi this is my code
void setup() {
size(200,250);
background(255);
smooth();
ellipseMode(CENTER);
rectMode(CENTER);
}
void draw() {
background (255, 50,0);
body();
head();
float x = 0;
}
void body() {
stroke(0);
//body
fill(255);
ellipse(105,83,30,20);
ellipse(103,98,25,18);
ellipse(98,113,25,18);
ellipse(118,120,18,18);
ellipse(138,120,18,18);
ellipse(158,120,18,18);
ellipse(168,110,10,10);
//head
}
void head(){
ellipse(100,60,60,30);
ellipse(85,40,20,30);
ellipse(115,40,20,30);
fill (random (250), random (250) , random (250));
rect(93,60,5,5); // Left Eye
fill (random (250), random (250) , random (250));
rect(107,60,5,5); // Right Eye '
}
I want to make the head move back and forth across the body