npoles=3; poles[0]= [ 0,0]; poles[1]= [-1,0]; poles[2]= [-1,0]; nzeros=0; k=1; //Gain multiplier function mcircle(m){ var y=[1,0]; for (var theta=-1;theta<5.28;theta+=.05){ y=[m*Math.cos(theta), m*Math.sin(theta)]; copy (y,gain); y[0]=1-y[0]; y[1]=-y[1]; cdiv(gain,y) Spot(gain[0],gain[1]); } Label('M='+m,gain[0],-gain[1]+.01); } InitGraph(); ScaleWindow(-1.6,-1,1.6,1); DrawAxes(); LineStart(-1,-.05); //mark the -1 point LineTo(-1,0); Label('M-circles',.5,.8); for(m=2;m<7;m++){ mcircle(m); } for(m=.2;m<.9;m*=2){ mcircle(m); } Colour(Black); s=[0,.1]; getgain(s); LineStart(gain[0],gain[1]); for(omega=.1;omega<100;omega*=1.01){ s[1]=omega; getgain(s); LineTo(gain[0],gain[1]); }