Skip to content

Instantly share code, notes, and snippets.

@jikkujose
Forked from antimatter15/ Smiley Face.carbide.md
Last active August 26, 2016 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jikkujose/946cbfd2ee8320c8695e62d55111c36a to your computer and use it in GitHub Desktop.
Save jikkujose/946cbfd2ee8320c8695e62d55111c36a to your computer and use it in GitHub Desktop.
Smiler
var canvas = document.createElement('canvas'),
ctx = canvas.getContext('2d')
function circle(x, y, r){
ctx.beginPath()
ctx.arc(x, y, r, 0, 2 * Math.PI)
ctx.stroke()
}
function mouth(theta){
ctx.beginPath()
ctx.arc(79, 75, 33, theta, Math.PI - theta)
ctx.stroke()
}
circle(72, 75, 62)
circle(51, 63, 12)
circle(100, 63, 12)
mouth(0.5313)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment