This Gist was automatically created by Carbide, a free online programming environment.
-
-
Save TomasKulhanek/b539c66ec4cba2bf3de4da7cf1fae798 to your computer and use it in GitHub Desktop.
Smiley Face
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var canvas = document.createElement('canvas'), ///Prvni zdrojový text v Carbide. \\ | |
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, 40, theta, Math.PI - theta) | |
ctx.stroke() | |
} | |
circle(72, 75, 62) | |
circle(54, 63, 12) | |
circle(100, 63, 12) | |
mouth(0.2969) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment