Skip to content

Instantly share code, notes, and snippets.

@zamfi
Created September 3, 2021 23:54
Show Gist options
  • Save zamfi/ca309c84f008ec741ad5961a743e3657 to your computer and use it in GitHub Desktop.
Save zamfi/ca309c84f008ec741ad5961a743e3657 to your computer and use it in GitHub Desktop.
function happyFace(x, y) {
// head
ellipse(x, y, 100, 100);
// eyes
ellipse(x-20, y-25, 20, 20);
ellipse(x+20, y-25, 20, 20);
// nose
line(x, y-20, x-10, y);
line(x-10, y, x, y+5);
// smile
arc(x, y+20, 40, 10, 0, PI)
}
happyFace(width/2, height/2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment