Skip to content

Instantly share code, notes, and snippets.

@lostinplace
Created January 20, 2014 19:09
Show Gist options
  • Save lostinplace/8526973 to your computer and use it in GitHub Desktop.
Save lostinplace/8526973 to your computer and use it in GitHub Desktop.
An inlet to Tributary
{"description":"An inlet to Tributary","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}},"tab":"edit","display_percent":0.7,"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,"hidepanel":false,"fullscreen":false}
var svg = d3.select("svg");
// Head
svg.append("rect")
.attr("width", 600)
.attr("height", 600)
.attr("x", 100)
.attr("y", 100)
.attr("rx", 23)
.style("fill", "#3D3D3D")
.style("fill-opacity", 0.22)
.style("stroke", "#535353")
.style("stroke-width", 20)
var arc = d3.svg.arc()
.innerRadius(50)
.outerRadius(70)
.startAngle(45 * (Math.PI/180)) //converting from degs to radians
.endAngle(3) //just radians
vis.append("path")
.attr("d", arc)
.attr("transform", "translate(200,200)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment