var ZERO_CROSSINGS2=function(){var t=600,a=100,r={top:0,right:0,bottom:0,left:0},e=d3.select("#zerocrossings2");t-r.left-r.right,a-r.top-r.bottom;var i=d3.scale.linear().range([0,t]);i.domain([0,8*Math.PI]);var s=d3.scale.linear().range([a,0]);s.domain([-1,1]);var l=d3.range(0,8*Math.PI,.01),n=d3.svg.line().x(function(t){return i(t)+1}).y(function(t){return s(.9*Math.sin(1.22*t))});e.append("svg:rect").attr("fill","grey").style("opacity",.1).attr("x",0).attr("y",0).attr("width",i(1.64*Math.PI)).attr("height",s(-1)-s(1));var c=d3.svg.axis().scale(i).tickSize(10).tickValues([2*Math.PI,4*Math.PI,6*Math.PI,8*Math.PI]).tickFormat(function(t){return t/(8*Math.PI)+" s"}).tickSubdivide(!0),o=d3.svg.axis().scale(s).tickSize(0).ticks(0).orient("left").tickSubdivide(!0);e.append("svg:g").attr("class","x axis").attr("transform","translate(0,"+s(0)+")").style("opacity",.35).call(c),e.append("svg:g").attr("class","y axis").attr("transform","translate(0,0)").style("opacity",.35).call(o),e.append("svg:path").attr("stroke-width",2).attr("stroke","purple").attr("fill","none").attr("opacity",.6).attr("d",n(l)),e.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").attr("fill","black").append("path").attr("d","M 0,0 V 4 L6,2 Z");for(var d=0;9>d;d++)e.append("circle").attr("cx",i(.82*Math.PI*(d+1))+1).attr("cy",s(0)).attr("r",4).attr("stroke-width",0).attr("stroke","black").style("opacity",.5).attr("fill","black"),e.append("line").attr("x1",i(.82*Math.PI*(d+1))+1).attr("y1",s(1)).attr("x2",i(.82*Math.PI*(d+1))+1).attr("y2",s(0)-5).attr("stroke-width",2).attr("stroke","black").style("opacity",.25).attr("marker-end","url(#arrowhead)")}();