Skip to content

Instantly share code, notes, and snippets.

@hemulin
Created October 16, 2012 14:05
Show Gist options
  • Save hemulin/3899472 to your computer and use it in GitHub Desktop.
Save hemulin/3899472 to your computer and use it in GitHub Desktop.
just another inlet to tributary
{"endpoint":"","display":"svg","public":true,"require":[],"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}
var vis = d3.select("svg")
.attr("height",500)
.attr("width",500);
var n = 30;
var h = 2*Math.PI;
for (var i = 0; i < n; i++) {
createCircle(i/100,i+1/100,i);
}
function createCircle(cx,cy,r) {
vis.append("circle")
.attr("cx",100+cx*r*h)
.attr("cy",(100+cy)/r*h)
.attr("r",r)
.style("fill",
"rgb(100,0,200");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment