Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Created December 4, 2012 00:17
Show Gist options
  • Save roundrobin/4199304 to your computer and use it in GitHub Desktop.
Save roundrobin/4199304 to your computer and use it in GitHub Desktop.
Another Inlet
{"description":"Another Inlet","endpoint":"","display":"svg","public":true,"require":[],"tab":"edit","display_percent":0.3687763713080174,"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}
var svg = d3.select("svg");
var c1X = 571;
var c1Y = -1220;
var c2X = 171;
var c2Y = -950;
var cX = 1024;
var cY = -1200;
svg.append("svg:circle")
.attr("r",50)
.attr("cx",0)
.attr("cy",0)
.attr("fill","#ff00ff");
var path = "M0,0 L0,-1200 C"+(c1X)+","+(c1Y)+" "+(c2X)+","+(c2Y)+" "+(cX)+","+(cY)+" L1024,0"
path = 'M0,0 L0,-0 C 35,0 99,0 1024,-0 L1024,10';
console.log(path);
var curtain = svg.append('path')
.attr("d",path)
.attr("transform","translate("+[0,20]+")")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment