Gist #4290622 
Gist #4290523 
Gist #4290508 
Gist #4290483 
Gist #4290448 
Gist #4290411 
Gist #4290343 
Gist #4290285 
Gist #3200444
- 
      
 - 
        
Save anonymous/4290667 to your computer and use it in GitHub Desktop.  
    Another Inlet
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | {"description":"Another Inlet","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":false,"vim":true,"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.5877988963825879,"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} | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var lineData=[], a=0, data=[], i, num=26, | |
| r, step= (360 / num) / 180 *Math.PI; | |
| var svg = d3.select("svg"); | |
| var lineFunction = d3.svg.line() | |
| .x(function(d) { return d.x; }) | |
| .y(function(d) { return d.y; }) | |
| .interpolate("basis-closed"); | |
| for( i = 0; i < num; i++ ){ | |
| data[i]=Math.ceil(Math.random()*6); | |
| r = 183 + data[i] * 43; | |
| a += step; | |
| lineData.push( {"x": 557+Math.sin(a)*r, "y": 525+Math.cos(a)*r} ); | |
| } | |
| svg.append("path") | |
| .attr({"d": lineFunction(lineData),"fill": "#FF0000", "opacity": 0.6 }); | |
| lineData=[]; | |
| for( i = 0; i < num; i++ ){ | |
| data[i]=Math.ceil(Math.random()*6); | |
| r = 188+data[i]*45; | |
| a += step; | |
| lineData.push( {"x": 546+Math.sin(a)*r, "y": 527+Math.cos(a)*r} ); | |
| } | |
| svg.append("path") | |
| .attr({"d": lineFunction(lineData),"fill": "#333", "opacity":0.7}); | |
| svg.selectAll("rect").data(data) | |
| .enter() | |
| .append("rect") | |
| .attr("x",13) | |
| .attr("y",function(d,i){return i*4+10}) | |
| .attr("width",function(d){return d*8}) | |
| .attr("height",3) | |
| .style("fill", "#25CAF3") | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment