ClearAll[x, z, m, xnPrime, R, x0, unPrime]
m = 3 ;
xnPrime = Solve[ ChebyshevT[m, x] == 0, {x} ] ;
xnPrime = (x /. xnPrime) ;
R = 30 ;
x0 = Cosh[ (1/m) ArcCosh[ 10^(R/20) ] ] // N ;
unPrime = (2 ArcCos[ #/x0 ] &/@ xnPrime) // N ;
zN = E^(I #) & /@ unPrime ;
AF[z_] = Product[ (z - zN[[i]]), {i, zN // Length}] // Expand 
AFc = CoefficientList[ AF[z], z ] // Re

(*x0

(z^2 -2 z (3/(2 x0^2)-1)+1)(z+ 1) // Expand

(z^2 -2 z (2(Sqrt[3]/2/x0)^2-1)+1)(z+ 1) // Expand
AF[z]

2 - 3/x0^2 +1
3 (1 - 1/x0^2)*)

Manipulate[
Column[{
PolarPlot[  Abs[AF[ E^(I 2 Pi d Cos[t] + I u0)]]^2 ,{t, 0, Pi},
PolarAxesOrigin->{0,max},
PolarGridLines->Automatic,PolarAxes->True,PolarTicks->{Table[{N[Pi/6 i],ToString[30 i]<>"°"},{i,-5,6}],Automatic},
PerformanceGoal->perfgoal
],
Show[
SphericalPlot3D[ Abs[AF[ E^(I 2 Pi d Cos[t] + I u0)]]^2, {t, 0, Pi}, {p, 0, 2 Pi},
PlotRange -> {-max, max},
PerformanceGoal->perfgoal,
AxesLabel->{x,y,z}
],axes]
}]

,{{d, 1/4, "d/λ"}, 0.01, 2 , Appearance->"Labeled"}
,{{u0, 0, "(Subscript[u, 0])"}, 0, 2 Pi, Appearance->"Labeled"}
,{{perfgoal, "Quality", "Performance Goal"}, {"Quality", "Speed"}}
,{max, None}
,{asz, None}
,{toff, None}
,{axes, None}
,
Initialization -> { 
max =
NMaximize[ {Abs[AF[ E^(I 2 Pi d Cos[t] + I u0)]]^2, t > 0, t <  Pi},{t}] // First ; 

asz = max /2 ;
toff = 0.1 ;
axes = Graphics3D[{
Red,Arrow[Tube[{{0,0,0},{asz,0,0}}] , 0.05],
Blue,Arrow[Tube[{{0,0,0},{0,asz,0}}] , 0.05],
Darker[Green, .8],Arrow[Tube[{{0,0,0},{0,0,asz}}] , 0.05],
Text[ "(Subscript[e, 1])",  {asz + toff,0,0} ],
Text[ "(Subscript[e, 2])",  {0,asz + toff,0} ],
Text[ "(Subscript[e, 3])",  {0,0,asz + toff} ]
}] ;
}
,SaveDefinitions->True
]

p3 = DynamicModule[{asz=22.189705962954182`,axes=Graphics3D[{RGBColor[1,0,0],Arrow[Tube[{{0,0,0},{22.189705962954182`,0,0}}],0.05`],RGBColor[0,0,1],Arrow[Tube[{{0,0,0},{0,22.189705962954182`,0}}],0.05`],RGBColor[0.`,0.19999999999999996`,0.`],Arrow[Tube[{{0,0,0},{0,0,22.189705962954182`}}],0.05`],Text["\!\(\*SubscriptBox[\(e\), \(1\)]\)",{22.289705962954184`,0,0}],Text["\!\(\*SubscriptBox[\(e\), \(2\)]\)",{0,22.289705962954184`,0}],Text["\!\(\*SubscriptBox[\(e\), \(3\)]\)",{0,0,22.289705962954184`}]}],d=(1/4),max=44.379411925908364`,perfgoal="Quality",toff=0.1`,u0=0.`},PolarPlot[((Abs[AF[(E^(I 2 π d Cos[t]+I u0))]])^2),{t,0,π},PolarAxesOrigin->{0,max},PolarGridLines->Automatic,PolarAxes->True,PolarTicks->{Table[{N[((π i)/6)],ToString[30 i]<>"°"},{i,-5,6}],Automatic},PerformanceGoal->perfgoal]] ;
p4 = DynamicModule[{asz=22.189705962954182`,axes=Graphics3D[{RGBColor[1,0,0],Arrow[Tube[{{0,0,0},{22.189705962954182`,0,0}}],0.05`],RGBColor[0,0,1],Arrow[Tube[{{0,0,0},{0,22.189705962954182`,0}}],0.05`],RGBColor[0.`,0.19999999999999996`,0.`],Arrow[Tube[{{0,0,0},{0,0,22.189705962954182`}}],0.05`],Text["\!\(\*SubscriptBox[\(e\), \(1\)]\)",{22.289705962954184`,0,0}],Text["\!\(\*SubscriptBox[\(e\), \(2\)]\)",{0,22.289705962954184`,0}],Text["\!\(\*SubscriptBox[\(e\), \(3\)]\)",{0,0,22.289705962954184`}]}],d=(1/4),max=44.379411925908364`,perfgoal="Quality",toff=0.1`,u0=0.`},Show[SphericalPlot3D[((Abs[AF[(E^(I 2 π d Cos[t]+I u0))]])^2),{t,0,π},{p,0,2 π},PlotRange->{-max,max},PerformanceGoal->perfgoal,AxesLabel->{x,y,z}],axes]
] ;
p3
p4

ClearAll[p1, p2] ;
p1 = DynamicModule[{asz=22.189705962954182`,axes=Graphics3D[{RGBColor[1,0,0],Arrow[Tube[{{0,0,0},{22.189705962954182`,0,0}}],0.05`],RGBColor[0,0,1],Arrow[Tube[{{0,0,0},{0,22.189705962954182`,0}}],0.05`],RGBColor[0.`,0.19999999999999996`,0.`],Arrow[Tube[{{0,0,0},{0,0,22.189705962954182`}}],0.05`],Text["\!\(\*SubscriptBox[\(e\), \(1\)]\)",{22.289705962954184`,0,0}],Text["\!\(\*SubscriptBox[\(e\), \(2\)]\)",{0,22.289705962954184`,0}],Text["\!\(\*SubscriptBox[\(e\), \(3\)]\)",{0,0,22.289705962954184`}]}],d=0.382`,max=44.379411925908364`,perfgoal="Quality",toff=0.1`,u0=3.5374333279421073`},  PolarPlot[((Abs[AF[(E^(I 2 π d Cos[t]+I u0))]])^2),{t,0,π},PolarAxesOrigin->{0,max},PolarGridLines->Automatic,PolarAxes->True,PolarTicks->{Table[{N[((π i)/6)],ToString[30 i]<>"°"},{i,-5,6}],Automatic},PerformanceGoal->perfgoal] 
] ;

p2 = DynamicModule[{asz=22.189705962954182`,axes=Graphics3D[{RGBColor[1,0,0],Arrow[Tube[{{0,0,0},{22.189705962954182`,0,0}}],0.05`],RGBColor[0,0,1],Arrow[Tube[{{0,0,0},{0,22.189705962954182`,0}}],0.05`],RGBColor[0.`,0.19999999999999996`,0.`],Arrow[Tube[{{0,0,0},{0,0,22.189705962954182`}}],0.05`],Text["\!\(\*SubscriptBox[\(e\), \(1\)]\)",{22.289705962954184`,0,0}],Text["\!\(\*SubscriptBox[\(e\), \(2\)]\)",{0,22.289705962954184`,0}],Text["\!\(\*SubscriptBox[\(e\), \(3\)]\)",{0,0,22.289705962954184`}]}],d=0.382`,max=44.379411925908364`,perfgoal="Quality",toff=0.1`,u0=3.5374333279421073`}, 

Show[SphericalPlot3D[((Abs[AF[(E^(I 2 π d Cos[t]+I u0))]])^2),{t,0,π},{p,0,2 π},PlotRange->{-max,max},PerformanceGoal->perfgoal,AxesLabel->{x,y,z}],axes] 
] ;
p1
p2

<<peeters` ;
(*peeters`setGitDir[ "notes\\blogit" ] *)
peeters`setGitDir[ "figures\\ece1229" ]

peeters`exportForLatex["ChebychevSecondMethodPolarFig1", p1]
peeters`exportForLatex["ChebychevSecondMethodSPolarFig2", p2]

peeters`exportForLatex["ChebychevSecondMethodPolarFig3", p3]
peeters`exportForLatex["ChebychevSecondMethodSPolarFig4", p4]