[ Launch: hexagon ] 5092607 by elsherbini
-
-
Save elsherbini/5092607 to your computer and use it in GitHub Desktop.
Quinone
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
{"description":"Quinone","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01} |
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
svg = d3.select("svg") | |
svg.attr("width", 1000).attr("height", 1000) | |
hexagon = "850,75 958,137.5 958,262.5 850,325 742,262.6 742,137.5" | |
tail = "M850 325 L742 388 L850 451 L742 514 L850 577 L742 640 L850 703 L742 766 L850 829" | |
svg.append("polygon") | |
.attr("points",hexagon) | |
.attr("transform", "scale (.5) translate(-500,0)") | |
.attr("fill","#FFFFFF") | |
.attr("stroke", "#000000") | |
.attr("stroke-width", 2) | |
svg.append("path") | |
.attr("d",tail) | |
.attr("transform", "scale(.5) translate (-500,0)") | |
.attr("fill-opacity","0") | |
.attr("stroke", "#000000") | |
.attr("stroke-width", 2) | |
svg.append("text") | |
.text("Q") | |
.attr("text-anchor", "middle") | |
.style("font-size" , 62 +"px") | |
.style("fill" , "#000000") | |
.attr("x" , 50) | |
.attr("y", 50) | |
.attr("transform", "translate (" + [122,72] +")") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment