Last active
September 2, 2019 19:57
-
-
Save indriApollo/811fca3ce788c0dbf7c9688d862d5b47 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<body> | |
<canvas id="myCanvas" width="300" height="100" style="border:1px solid #d3d3d3;"> | |
Your browser does not support the HTML5 canvas tag.</canvas> | |
<script> | |
var c = document.getElementById("myCanvas"); | |
var ctx = c.getContext("2d"); | |
for(var x = 2; x < 300; x+=4) { | |
var y = 100-(Math.log(x)*17); | |
if(y < 1) y = 1; | |
ctx.rect(x, y, 1, 40-Math.log(x)*2.5); | |
} | |
ctx.stroke(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment