Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Created December 4, 2012 00:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roundrobin/4199371 to your computer and use it in GitHub Desktop.
Save roundrobin/4199371 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.5424753867791864,"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}
var svg = d3.select("svg");
var x1 = 0;
var y1 = -1200;
var x2 = 0;
var y2 = 1200;
var c1X = 1024;
var c1Y = 0;
var c2X = 1024;
var c2Y = 0;
var cX = 1024;
var cY = 0;
svg.append("svg:circle")
.attr("r",50)
.attr("cx",0)
.attr("cy",0)
.attr("fill","#ff00ff");
var path2 = "M0,0 l"+(x1)+","+(y1)+" c"+(c1X)+","+(c1Y)+" "+(c2X)+","+(c2Y)+" "+(cX)+","+(cY)+" l"+(x2)+","+(y2)+""
var 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("d",path2)
.attr('transform',"translate("+[48,633]+")scale(0.3)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment