Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Created December 4, 2012 00:27
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/4199354 to your computer and use it in GitHub Desktop.
Save roundrobin/4199354 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.3926863572433209,"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 = 1024;
var y2 = 10;
var c1X = 571;
var c1Y = y1-20;
var c2X = 171;
var c2Y = -950;
var cX = x2;
var cY = y1;
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("transform","translate("+[0,1484]+")")
.attr("d",path2)
.attr('transform','scale(1)')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment