Manipulate[
Grid[{
{ Row[{"(Subscript[D, 0]) = ", 2 NMaximize[ {U[th, alpha], 0 ≤ th ≤ Pi}, {th}][[1]]/
NIntegrate[ U[th, alpha] Sin[th], {th, 0, Pi}]
}]
},
{
If [ threeD,
Show[
SphericalPlot3D[ 
U[t, alpha]
, {t, 0, Pi}, {p, 0, 2 Pi}
, PlotRange -> Full
,PlotStyle->Directive[Opacity[0.7]]
,ImageSize->300
,PerformanceGoal->"Quality"
], 
axes
(*, ViewPoint->Left*)
,ViewVertical->{-1,0,0}
],
PolarPlot[ 
U[t, alpha]
, {t, 0, Pi}
, PlotRange -> {{-4,4}, {0, 5}}
,ImageSize->300
, Epilog -> { 
Thickness[Large],
Arrow[{{0,0}, {1,0}}],
Text[ "(Subscript[e, 3])",  {1.1,0} ] }
]
]
}}
]
,
{{alpha, 1, "α, where l = α λ"}, 0.1, 5, Appearance -> "Labeled"},
{{threeD, False, "3D"}, {True, False}},
Initialization:> {
U = ((Cos[Pi #2 Cos[#1]] - Cos[Pi #2])/Sin[#1])^2 & ;

asz = 1 ;
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} ]
}] ;
},
ContinuousAction->False,
SaveDefinitions->True
]

pp =  ;

peeters`exportForLatex["longDipoleLequals2LambdaFig1", pp]