Created
March 3, 2018 12:22
-
-
Save anbnyc/d979bb93a070295ec9cdd8d254151767 to your computer and use it in GitHub Desktop.
SVG polygon points for a five-pointed star
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
const star = radius => | |
[0, .4, .8, .2, .6, 0].map(d => | |
Math.round(1000* radius*Math.cos(2*Math.PI*d - .5*Math.PI) )/1000 | |
+","+ | |
Math.round(1000* radius*Math.sin(2*Math.PI*d - .5*Math.PI) )/1000 | |
).join(' ') | |
star(7.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment